my (simple) sudoers doesn't work
Hello,
I wish to halt|shutdown| sleep my machine as an unprivilegied user on
the command-line or via the menu of a light window-manager.
Here's my /etc/sudoers
Defaults env_reset
# User alias specification
User_Alias STOP = gv
# Cmnd alias specification
Cmnd_Alias SLEEP = /usr/sbin/acpitool -S
Cmnd_Alias HALT = /usr/sbin/halt
Cmnd_Alias REBOOT = /usr/sbin/reboot
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL
STOP ALL= NOPASSWD: SLEEP, HALT, REBOOT
The only thing I got to work is to insert
gv ALL=(ALL) ALL
But in all other configurations,
gv ALL = /usr/sbin/acpitool -S
gv ALL = SLEEP
the response I get is:
gv@fantasio:~$ sudo halt
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for gv:
Sorry, user gv is not allowed to execute '/sbin/halt' as
root on fantasio.champignac.
What is the mistake ? (I use visudo and sudo 1.6.9p17-3 on Lenny)
Thanks in advance,
--
Gauthier
Les îles, c'est pas des îles,
au fond de l'eau, ça touche.
(Brèves de comptoir - J-M Gourio)
Reply to: