On Mon, 2002-04-22 at 14:46, [EMAIL PROTECTED] wrote:
> How can I assign permission to a user "mike" to be able to shutdown the
> computer.
>
> I have tried to create a group and assign the group to the shutdown command
> using chown, tried changing the permissions to 777 or rwxrwxrwx using chmod
> shutdown, this doesn't work tells me I still need to be root. I have edited
> the sudoers file to allow "mike" ALL = NOPASSWD: ALL this doesn't help.
>
> can someone tell me how to make user "mike" use the shutdown command
sudo is your friend.
from the sudoers man page:
ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm
would allow the user ray to run /bin/kill, /bin/ls, and
/usr/bin/lprm as root on
the machine rushmore as root without authenticating himself. If
we only want
ray to be able to run /bin/kill without a password the entry
would be:
ray rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls,
/usr/bin/lprm
install the rpm and add something like the above to /etc/sudoers and you
will be good to go.
mike would then just prepent sudo to the command:
mike$ sudo shutdown -r now
or what ever.
I believe you can also add some stuff that will add the user
specifically to the "shutdown group but I never figured out how linux
conf used to do that and I like having all that sort of stuff in one
place like sudoers.
BTW
The password is the users own not root's.
This is a very powerful tool and I use it all the time.
HTH
Bret
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list