sudo not working for a specific command

Latest response

Hi Guys,

thanks always for your support. I have a user defined in /etc/sudoers to run specific commands without password

sasowner ALL = NOPASSWD: /bin/chown, /bin/chgrp, /bin/chmod, /usr/bin/setfacl, /usr/bin/getfacl, /usr/bin/nfs4_getfacl, /usr/bin/nfs4_setfacl, /bin/find, /bin/rm , /bin/su , /usr/bin/rsync , /usr/bin/lsfup.sh , /usr/bin/lsfdown.sh , /usr/bin/du , /usr/sbin/iotop , /bin/ln , /bin/mv

all the mentioned commands work without prompting for password except /bin/ln .

example :

sasowner : > sudo ln me me1 is prompting the user to enter a password
sasowner : > sudo chmod 700 me : runs without asking for password

Also to note, the same above runs in other nodes without any issue.

Your help is truly appreciated.

Thanks

Arrey

Responses

Most likely your sudo ln me me1 resolves to /usr/bin/ln not /bin/ln. What does which ln say?

Regards, Rauno

Thanks Rauno

which ln is /bin/ln

thanks

Collect 'strace' output while running on this machine and another that does work. Compare the output for clues.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.