Whenever we execute a command with “sudo” privileges, we are always asked to enter the “Sudo” password before its execution. However, at times, you want to get rid of this hassle by disabling the “Sudo” password. Therefore, we are here with this article that will guide you on how you can disable the “Sudo” password in Linux Mint 20 and Ubuntu 20.04.
If you want to disable the “Sudo” password in Linux Mint 20, then you should perform the following three steps:
First, you need to access the Sudoers file. This can be done by executing the command that follows:
$ sudo visudo
When you will execute this command, you will be asked to enter the “Sudo” password since we have used the “sudo” keyword with it. You need to type in your “Sudo” password and press the Enter key as shown in the image below:
Once the Sudoers file is opened in the text editor, you need to scroll it all the way down to the “includedir /etc/sudoers.d” comment. Below this comment, you need to add the following entry:
kbuzdar ALL=(ALL) NOPASSWD:ALL
You can replace “kbuzdar” with your particular username. After that, you can close this file and exit from your text editor.
Now, you need to verify whether the “Sudo” password has been disabled or not. You can simply do this by executing any command of your choice with “sudo” privileges just like we did below:
$ sudo apt update
This time, you will notice that the update process will immediately begin without even asking you for the “Sudo” password as shown in the following image:
If you want to enable the “Sudo” password again, you can simply remove the entry that you made in step # 2 of the method shown above. After removing that entry, you can simply save and close your file. Once you will do that, the “Sudo” password will be enabled again and you will be able to verify it by running any desired command with the “sudo” privileges.
This article provided you with a quick method of disabling the “Sudo” password in Linux Mint 20. Moreover, you can also re-enable it any time you want by following the pro-tip provided in this article.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…