Disable Passwords
Updated 20 December 2025
Although it's possible, and I'm going to tell you how, it's not a good idea to disable password authentication. Well, unless you develop a better method of restricting elevated privileges. Password authentication for elevated privileges is not designed to protect you from yourself. It's designed to prevent an attacker (either on your local area network or the Internet) from gaining elevated privileges.
Disable the Sudo Password
At the terminal, type:
sudo visudo
Go to the end of the file and enter:
username ALL=(ALL) NOPASSWD: ALL
Replace "username" with your username, of course.
Exit the terminal and when reentering the terminal, the sudo password will not be required when using sudo as part of a command.
Disable the GUI Password
At the terminal, type:
sudo -s
Navigate to:
/etc/polkit-1/rules.d
Create file:
disable.rules
Add this and save:
polkit.addRule(function(action, subject) {
return polkit.Result.YES;
});
Log out and log back in, and the next time using the GUI, no password will be required.