how to share a command with other users?
I want my other user to be able to shutdown without having to do the "su -" command all the time. is that possible?
|
As root run:
# chmod 755 /sbin/shutdown Then an ordinary user should be able to shutdown with: $ /sbin/shutdown -h now Or if they don't want to type the "sbin" first, create a link in /usr/bin to it like so: # ln -s /sbin/shutdown /usr/bin/shutdown Then all they need to do is run: $ shutdown -h now |
my answer........ stolen!
note: I like to use "telinit 0" instead if /sbin/shutdown. (does same thing). |
Configure the one command ("shutdown") in the file "/etc/sudoers" for every user. This way, your users will be able to access this command through sudo without knowing the root password and without modifying the rights to the binary. This has several advantages.
Check the following for more information on how to do this: http://www.onlamp.com/pub/a/bsd/2002...y_Daemons.html http://www.onlamp.com/pub/a/bsd/2002...y_Daemons.html (these two are for FreeBSD, but Slackware is almost the same) |
All times are GMT -5. The time now is 10:57 PM. |