 |
 |
ssh command in os x to reboot your system?
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status:
Offline
|
|
To restart the system, is the command sinply reboot? I ask because it's not working on my system.. in fact, the only command that is working is "shutdown now"... which tries to shut down the system, but just leads me to a blank screen with a few strings of text and a command line that does nothing! I think I've been hacked!
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2002
Status:
Offline
|
|
try using halt/ reboot. You need to run
them as super user though.
I don't really understand what happened
to your mac. Can you give more detail?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
shutdown now doesn't actually shut the computer down (confusing huh?). It actually drops the computer to single user mode, but how well that works on OS X I can't be sure, haven't really tried it.
The command to shut the machine down that you want is:
shutdown -h now
Or, to restart the computer, you'll want:
shutdown -r now
They'll all need to be run as root, so sudo them if necessary.
- proton
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status:
Offline
|
|
Originally posted by theory:
try using halt/ reboot. You need to run
them as super user though.
I don't really understand what happened
to your mac. Can you give more detail?
It's quite odd... I've have small, but very annoying issues with the box lately... 1st off my perfered admin account, i.e. the one I do everyday use with and is configured "just so" is screwing up on me... this account has lost all rights to any mountable volumes such as my CD-rom (built in) zip drive (built in) and my formac DVD-R/rw firewire drive... if I boot into the box with the cd-rom having a disk inserted into it at boot time, when I try to eject it once I get to the desktop it errors with a message that say I don't have rights to the drive... same thing for all other drives... If I boot with nothing in the drive and try to put a disk in the drive one at the desktop, it simply ejects the disk... My root account does not have this issue and my second admin account is "so far so good" as well.
Next thing was the ssh trouble... I just moved, so I had to reconfigure my network in my new place... I live in a townhouse/apartment complex and many people have wireless networks around me, as my G4 picked up, so I had to use my airport router as my first node and my regular router behind it so people could not highjack the root of my network... anyway, I've got a pocketpc with wireless card that I do all my remote admin with to my network... the only workstation currently on the wireless node is the G4 in question.
The other night when I tried to log into the box from my bedroom to shut it down for the night, I got this error message... none of the regular commands were working... reboot restart shutdown... none! very odd... It had been a while since I had logged into a OS X box so I simply thought maybe I forgot something or a command... next day I went into my computer room to try the commands on the terminal app, I remembered "shutdown now"... this cmd worked... but instead of shutting down the box... the box did the little revolving cicrle like it was about to shut the box down but then my primary monitor went black and brought up a screen I can only describe as what looked to be single user mode... while the secondary monitor did nothing... the desktop was still there, but my mouse driver has died... At this point I tried issuing commands from the prompt given to me... reboot restart and shutdown did not work... I could, however display the directory with ls, however.... very strange... I never saw a cmd prompt anything like this one.
It could be worhty to mention that the mounting disk trouble has been an issue for about a month now... before I moved... the ssh... I don't know because I have not had to ssh into the box for about a year... so who knows when this started...
It also might be of value to mention that at my old address there was a very faint connection to a wireless linksys router on my airport connection then... and at that time the wireless node was behind the regualar router... which could have given somebody access to the root of the network... all other boxes were win2000 however.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status:
Offline
|
|
Originally posted by proton:
shutdown now doesn't actually shut the computer down (confusing huh?). It actually drops the computer to single user mode, but how well that works on OS X I can't be sure, haven't really tried it.
The command to shut the machine down that you want is:
shutdown -h now
Or, to restart the computer, you'll want:
shutdown -r now
They'll all need to be run as root, so sudo them if necessary.
- proton
I see... so that *was* single user mode... lol 
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2002
Status:
Offline
|
|
First of all to fix the problem with mounting
disks check that the /Volumes has
rwxrwxrwxt permissions on (that is it
has read, write and execute for every one
and sticky bit on so if some one mounts
a disk only that person can unmount it)
Secondly which version of Mac OS X are
you using (10.2 or less ?) because console
text on top of the desktop (ie white text
with a black background but you can still
see your OS X desktop /dock etc..) means
you got a kernel panic. Kind of like
a system bomb in OS 9. Nothing critical
unless it happens too frequently.
When you restart and you repair your HD
there should be no problem.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status:
Offline
|
|
Originally posted by theory:
First of all to fix the problem with mounting
disks check that the /Volumes has
rwxrwxrwxt permissions on (that is it
has read, write and execute for every one
and sticky bit on so if some one mounts
a disk only that person can unmount it)
Secondly which version of Mac OS X are
you using (10.2 or less ?) because console
text on top of the desktop (ie white text
with a black background but you can still
see your OS X desktop /dock etc..) means
you got a kernel panic. Kind of like
a system bomb in OS 9. Nothing critical
unless it happens too frequently.
When you restart and you repair your HD
there should be no problem.
No no.... my second monitor still had desktop wallpaper on it... my main monitor was black and had the command line on it... I don't know if you have mulitple monitors, but evidenlty, it does this when you do it from the terminal app (shutdown now)
How could my /volumes directory ever get that screwed up in the first place?
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status:
Offline
|
|
You don't need the -h flag. "sudo shutdown now" works the same as shutdown -h now.
Chris
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
Originally posted by chabig:
You don't need the -h flag. "sudo shutdown now" works the same as shutdown -h now.
Not if you read the manpage it doesn't:
shutdown manpage:
At shutdown time a message is written in the system log, containing the time of shutdown, who initiated the shutdown and the reason. A terminate signal is then sent to init to bring the system down to single-user state (depending on above options). The time of the shutdown and the warning message are placed in /etc/nologin and should be used to inform the users about when the system will be back up and why it is going down (or anything else).
Without the -h option, it drops to single user mode. If it doesn't, it's not doing what the manpage says and you should use the -h anyway as the behaviour may be changed to match the documentation. If it doesn't, it's breaking the standards associated with the shutdown command.
I'm not about to try it to see what happens, I've got too much running that I don't want to restart right now, but every other Unix and Unix-like operating system I've used, without the -h it drops to single user mode like the documentation says.
- proton
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status:
Offline
|
|
Originally posted by theory:
First of all to fix the problem with mounting
disks check that the /Volumes has
rwxrwxrwxt permissions on
Where do I find this volume? I'm logged in as root right now and I've made all invisible folders seeable... still can't find it....
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Up north
Status:
Offline
|
|
it's path is just that..
/Volumes
use the terminal.. finder won't help, if you want to use super user, use "su" to login as it.
type 'cd /Volumes' to get into it, this is where all mounted drives are
to change the permissions on /Volumes, cd back to /, and use chown, chgrp..
check permissions use ls -al
edit : oh, forgot, if you want to see /Volumes with the finder, go to the go menu, and use go to folder, and type in /Volumes
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
It sounds like your "Just So" tweaked admin user might be a little too tweaked, esp if root and another user work fine.
About the AirPort thing, why don't you just create a private, password protected network rather than moving your subnets around? If you set the network to not broadcast its' name (I think that's what private does) and give it a good password, then especially in an apartment building that should be quite adequate, unless you are afraid that someone will hack your airport, in which case your router is probably not much more secure.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by Tyler McAdams:
I see... so that *was* single user mode... lol
I believe that shell is either bash or plain sh.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jun 2003
Status:
Offline
|
|
Originally posted by Tyler McAdams:
I see... so that *was* single user mode... lol
sudo is short for "do as super user", not "do in single user". single user mode in osx is the one where you hold down cmd-s during startup.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by qubit:
sudo is short for "do as super user", not "do in single user". single user mode in osx is the one where you hold down cmd-s during startup.
I'm not sure how sudo got brought into this, but sudo shutdown now means execute a command as root to switch the system into single user mode.
Single user mode is not initiated by sudo, but rather by the shutdown command.
You can access single user mode without having to hold CMD-S at startup.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2002
Location: Hilton Head, SC
Status:
Offline
|
|
Originally posted by absmiths:
I'm not sure how sudo got brought into this, but sudo shutdown now means execute a command as root to switch the system into single user mode.
Single user mode is not initiated by sudo, but rather by the shutdown command.
You can access single user mode without having to hold CMD-S at startup.
That to me makes no since at all... why would shutdown now mean single user mode? I mean I know that's what it does... takes you to a single user mode enviorment... but shutdown now ususally means... well, shut down the system...
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
Originally posted by Tyler McAdams:
That to me makes no since at all... why would shutdown now mean single user mode? I mean I know that's what it does... takes you to a single user mode enviorment... but shutdown now ususally means... well, shut down the system...
The command line shutdown command is a Unix command. Hence, to understand why it does what it does, you'll need to understand a little Unix. In short, most Unix systems aren't ever actually shutdown, but the shutdown command could bring the system down to single user mode where some system maintenance could be performed. After finishing this, on these Unix systems, you could just bring the system back to full multiuser mode, and never actually shut the computer off. This is very useful for some machines with very long startup procedures.
If you want the system to do what you call a "shutdown", then you want to do what was known as a halt. When you run shutdown -h now it performs a standard Unix shutdown, but when it's ready to go to single user mode, it instead runs the program halt.
It's just one of those history things really. That's the way it is, and that's the way it should be. The Unix gods said so
- proton
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by Tyler McAdams:
That to me makes no since at all... why would shutdown now mean single user mode? I mean I know that's what it does... takes you to a single user mode enviorment... but shutdown now ususally means... well, shut down the system...
While I agree that the name is misleading (I don't think I have ever tried to explain that to someone who said "That makes sense.") it is one of those historical things (as proton said). If you don't like it, create an alias so the name makes more sense.
On the Mac side, I also don't think that I ever tried to explain that you eject disks by throwing them in the trash and didn't see panic on the persons' face.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jan 2003
Location: Stuttgart, Germany
Status:
Offline
|
|
Since when has Unix been logical? It wasn't designed, but rather evolved to the ball of mud it is now
I feel morally obliged to post a link to the Unix Haters Handbook (but keep in mind, that most of the things in the book are outdated or fixed today): Download the UHH.
Have fun :-)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|