On a RHEL server I would like to let a user run a command as root without a password:
# uname -a Linux foo.com 2.6.32-220.38.1.el6.x86_64 #1 SMP Wed May 15 08:34:56 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux # cat /etc/issue Red Hat Enterprise Linux Server release 6.5 (Santiago) Kernel \r on an \m # visudo User_Alias FOOEMPLOYEES = someuser Cmnd_Alias FOOCOMMANDS = /root/bin/fix-permissions FOOEMPLOYEES ALL = NOPASSWD: FOOCOMMANDS
For some reason, the system is still asking the user for his password:
$ alias alias fix-permissions='/root/bin/fix-permissions' $ fix-permissions -bash: /root/bin/fix-permissions: Permission denied $ sudo fix-permissions [sudo] password for someuser:
Why might the
sudo configuration not work? Did I configure it wrong? I copied the configuration from this guide.