Ubuntu remove password: for sudo, from user, for root

Ubuntu remove password: for sudo, from user, for root

Ubuntu allows users to disable the password gateway under My Linux. Read this article below to disable this password requirement.

How to remove sudo password

To disable the password requirement, click on Application > Accessories > Terminal. Next, enter this command line sudo visudo and press enter. Now, enter your password and press Enter.

  • Then, search for %admin ALL=(ALL) ALL and replace the line by %admin ALL=(ALL) NOPASSWD: ALL. Used shortcut key [CTRL] + [o] and press Enter to save all changes. Next, use shortcut key [CTRL] + [x] to close the file.
  • This should now stop you being asked your password for all commands. 

How to increase the time between password requests

Alternatively, you can just increase the interval between password prompts by adding a line to the /etc/sudoers. For example, up to 120 minutes.

  • Type the command sudo visudo and press Enter.
  • Enter your password and press Enter.
  • Find the lines that start with Default and add Defaults timestamp_timeout=120 where 120 is the number of minutes between retries.

Save the file and exit. The sudo password prompt will expire two hours after the user runs sudo.

Need more help with Linux? Check out our Forum!
Around the same subject