Skip Password Prompt When Executing sudo

To skip the system prompt for the administrator's password, add the following to your sudoers file:

# Don't prompt for password when using sudo.
user ALL=(ALL) NOPASSWD: ALL

This will modify the sudoers file to skip the sudo password prompt for the current user.

Or in one step, do this on the command line:

whoami=$(whoami)
sudo bash -c 'echo -e "# Don'\''t prompt for password when using sudo.\n'$whoami' ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
Did this help you? Please let me know with a comment. Thank you
Posted .

1 comment (RSS)

  1. anonymous

    Awesome, thnx! :)

Leave a comment