Wednesday 3 July 2013

How to Bypass Password Authentication using sudo

Problem: You want one user to run a command as another user without supplying a password

Solution: Use sudo's NOPASSWD tag, which indicates to sudo that no password is needed for authentication.

/etc/sudoers
smith ALL = (jones) NOPASSWD: /usr/local/bin/mycommand args
smith ALL = (root) NOPASSWD: /usr/local/bin/my_script ""
 


Password-less authentication is particularly useful for batch jobs.

No comments:

Post a Comment