 |
 |
shutdown command
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2002
Status:
Offline
|
|
hi there
I am looking for the shell command to shut down my computer when my computer isn’t logged in. I know “sudo shutdown -h” seems to be correct, but this command doesn’t work when I am logged out because sudo needs a password. Anyone here who can give me an advice?
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Nov 1999
Location: Rochester, MN
Status:
Offline
|
|
I am not quite sure what you are asking... try /sbin/halt
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
You can't do anything when you aren't logged in. You must be logged in as some user.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2002
Location: case.edu
Status:
Offline
|
|
Normal users might be able to do '/sbin/halt' or '/sbin/shutdown -h now'.
As Chuckit says, you have to be logged in to do anything (though not necessarily as root, and not necessarily a graphical login session).
|
pb 1440x960 | 1.67, 1.5, 128, 80 | leopard
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
If you are trying to write a shell script to shutdown the machine, the command is simply "shutdown -h now", but the script must be run as root. If the script doesn't have root access, there's no way to shutdown the machine. If there is, it's a security hole that needs to be closed.
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2002
Status:
Offline
|
|
Thank you for your help. ok, I accept it that I have to login.
here's my next problem ;-)
I am using this little Apple Script and saved it as an application.
tell application "Finder"
shut down
end tell
When I paste the absolute path to this apple app into my shell script, Tiger pops up a dialogbox whether I want to quit or to run the script. However my computer should shutdown without a message. Any ideas?
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Sep 2005
Location: J a p a n
Status:
Offline
|
|
When you select "shut down" from the Apple menu, it asks if you are sure. There's a little 2 minute count down timer on that dialog box. Is that what you mean? If you wait the 2 minutes the machine will automatically shutdown anyway ...
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2002
Status:
Offline
|
|
Hi there,
thank your replies. I solved my problem. I didn't save my AppleScript with the correct settings. The app should be "read-only". that's it!
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|