Results 1 to 10 of 16
i dont know whats wrong but i cant run the shutdown command. is there a reason i cant.
Code:
shutdown -r now
this should restart my system but it wont ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-15-2003 #1
shutdown command
i dont know whats wrong but i cant run the shutdown command. is there a reason i cant.
this should restart my system but it wont work is it cause im logged in as a user but that shouldnt matter. i wouldnt think. can anyone helpCode:shutdown -r now
BIG K aka Kyle
Programming Forums
www.kylekonline.com
Please don\'t PM me for help-- ask in the forums instead!
- 08-15-2003 #2
Maybe you dont have /sbin (where shutdown normaly is) in your PATH?
Besides, I think you have to be root to do it...
- 08-16-2003 #3Linux Engineer
- Join Date
- Mar 2003
- Location
- U.S.A.
- Posts
- 1,025
If you can do it as root then the difference is most likely in the user profile since any typical user should have file rights for but your user doesn't have the correct default paths.
Also if you try from a terminal window a "su -" and try it again does it work?Dan
\"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"
- 08-16-2003 #4
ok i logged out of user and into root and ran the command and it worked but if i log in under user and "su" i still cant. but i dont know im sure there is some setting i can do that will make anyone shutdown i jst need to find it. thanks for the help guys
BIG K aka Kyle
Programming Forums
www.kylekonline.com
Please don\'t PM me for help-- ask in the forums instead!
- 08-16-2003 #5Linux Engineer
- Join Date
- Mar 2003
- Location
- U.S.A.
- Posts
- 1,025
Did you "su" or "su -" ? "su -" get you root rights and profile where "su" only gets you root rights.
Dan
\"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"
- 08-16-2003 #6
well you learn something new everyday. i didnt know it made a difference.
but i know no for future reference
BIG K aka Kyle
Programming Forums
www.kylekonline.com
Please don\'t PM me for help-- ask in the forums instead!
- 08-16-2003 #7Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
i think all the su - command does is read the ~/.profile & ~/.bashrc files upon username change.
as a user, try running /sbin/shutdown -r now , just to see if it is a PATH issue. if that does not work, then you may always need to be root?
Jason
- 08-16-2003 #8
I always use halt to shutdown my linux box.
- 08-16-2003 #9Linux User
- Join Date
- Jun 2003
- Location
- Calgary, AB CANADA
- Posts
- 496
I always use su -- (two minus signs). What's the diff between using one and using two?
\"Everything should be made as simple as possible, but not simpler.\"
Albert Einstein
- 08-16-2003 #10Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
I dont know CT. I checked the man page (man su), and it only mentioned using one minus sign.
Jason


Reply With Quote
