Wednesday, May 1, 2019

Run commands with sudo without having to enter a password

Problem

Need to temporarily allow access to user to run commands with sudo without typing password (for batch jobs)

Solution

Add following entry to /etc/sudoers to allow remoteuser to execute commands with sudo without entering password.

remoteuser ALL=(ALL) NOPASSWD:ALL

References
https://askubuntu.com/questions/334318/sudoers-file-enable-nopasswd-for-user-all-commands/340669

No comments:

Post a Comment