Wednesday, October 12, 2011

Sudo without password prompt

Remote scripts often do something that requires root rights, common approach is to use sudo. But by default it interactively prompts for password, which is not easy thing if you execute commands automatically. Fortunately, it can be easily configured not to do it. All that is needed to do is to update /etc/sudoers, and change something like this:
testuser    ALL=(ALL) ALL
to something like this:
testuser    ALL=(ALL) NOPASSWD: ALL

No comments:

Post a Comment