I added three lines to my sudo configuration, using visudo.
User_Alias INSTALLERS = myusername
Cmnd_Alias INSTALL_CMDS = /bin/yum, /bin/make
INSTALLERS ALL = (root) NOPASSWD:NOEXEC: INSTALL_CMDS
After saving, if I run
sudo yum update
with myusername account, there are two problems:
1) I'm asked for my password
2) When I enter my password, I'm told "Sorry, user myusername is not allowed to execute '/usr/bin/yum update' as root"
Any idea why?
Thanks for your help.
/bin/yum
!=/usr/bin/yum/
– NickW May 15 '13 at 10:53which
before adding a command to sudoers, lord knows I'm not immune to errors of that sort :) – NickW May 15 '13 at 10:56