User shutdown - 'cp -i -p shutdown /usr/sbin/shutdown2 - why does this not work, can?
Hello,
Why can not 'shutdown' script file be copied to path of ordinary user and then called? After I copied to new file /usr/sbin/shutdown2 (which I thought was in the ordinary users' path), I still could not shutdown. Why can't user call for that executable file? Interestingly, as root, I was able to call 'shutdown2 -hP now' and affect a power off. ls -l shutdown2 -rwxr-xr-x 1 root root 16864 2008-04-02 19:40 shutdown2 So why is the output $ shutdown2 -bash: shutdown2: command not found It seems that users and root have the same login shell, yet the command is not found. I have seen that others have solved using sudoer, however, other os seem to have it already available for users to call 'shutdown' without invoking 'sudo'. M |
Quote:
What shell root and users run don't make a difference..it's the privilege level they run it AS that makes the difference. |
Quote:
Check the results of $ echo $PATH as root and as a regular user, and compare. |
FC5 and Fedora10 users can shutdown - How?
Thank you TBOne and anomie.
I have previously loaded FC5, Fedora10 and Ubuntu and all three allowed me to shutdown and poweroff without additional permissions granted by root. This is a desktop computer AMD K7. I am yet to fully understand the permission issue since I thought that the users were able to read and execute the command as above. I also tried putting 'shutdown3' in '/usr/bin' just for trial and error. My error. M |
Quote:
From the command line, though, things are different. |
All times are GMT -5. The time now is 03:38 AM. |