shutdown RH 8
I usually logged as a regular user. whan I want to shotdown the system I know I must su to root an than enter the command shutdown or init but whan I do that I recive command not fownd.
why? |
shutdown is located in /sbin/ which isn't in a normal users $PATH. If you just run su it doesn't create a login shell so you don't get that users environment settings etc.
Short answer - if you use su you will have to run /sbin/shutdown Otherwise run su - (that's su followed by a dash) and that makes it a login shell and you can run shutdown without having to specify it's path. |
because when you su to root the root profile file is not executed. first execute the profile file and this problem will fly away
#. /root/.bash_profile |
silent bob gave the correct answer.
Cheers for Silent BOB |
if you chmod 7755 /sbin/shutdown you can shutdown the machine as regular user
|
Quote:
|
Quote:
|
How can you do what? Allow all users to be able to shutdown? nakkaya told us how to do it.
|
If you use the "su - root" it will load root's PATH and then you can just issue your shutdown command.
|
All times are GMT -5. The time now is 08:37 PM. |