Sudo Configuration on Ubuntu and Linux Mint

Sudo Config Ubuntu

System administrators can allow users to execute commands without passwords using Sudo rights, also known as superuser do. This command temporarily elevates privileges, allowing users to do crucial tasks without logging in as the root user. As a result, you must authenticate yourself by entering your login credentials into the system, confirming that you have the appropriate rights to perform tasks.

However, providing this information again overtakes time, but there is a way that you can use it to disable the authentication. As a result, this article will show you how to create a password-less sudo on Ubuntu and Linux Mint. So is Linux mint good for beginners? I would say Linux Mint is one of the best Linux distro for Beginners. Linux mint requires the same hardware as Ubuntu, and Installing Linux Mint is easy, have a look here to download it.

Requirements

  • Install Ubuntu or Linux Mint first.
  • Root/sudo access.

How to configure a sudo command without any password

For this configuration, you need to open a sudoer which is a very straightforward task to perform, and you can do that by typing

$ sudo visudo

Graphical user interface, text, application Description automatically generated

Now you should see the sudoer file in the default editor you are currently using. After that, you will see some pre-written commands in the file, shown below.

Text Description automatically generated

You need to scroll down a little and follow the general syntax below.

nbsp;<user_name> ALL=(ALL:ALL) NOPASSWD: ALL

In the above command, you need to replace the “<user_name>” with the name of the user you want to give all the administrative rights.

For example, in our case:

nbsp;taimoor ALL=(ALL:ALL) NOPASSWD: ALL

The above command shows that you are giving all the rights to the user “taimoor” This user can execute any command without providing the password. So, before providing permission to this user, let’s first see what will happen when this user tries to execute any command using a terminal. For example,

$ sudo apt update

Graphical user interface, text, application. Linux Mint Ubuntu

We ran a very basic command in the terminal, and we needed to provide the password to execute this command. Now we will try to compare the result when we save the command mentioned above in the sudoer file.

nbsp;taimoor ALL=(ALL:ALL) NOPASSWD: ALL

Text  Description automatically generated

After that, you need to press “CTRL+X” to save and exit the file, and then for verification, you can run any command in the terminal, for example:

$ sudo apt update

Text Description automatically generated

As you can see now, it didn’t ask for any password after executing the file. Let’s take another example and try to execute a different command this time like we will install java development kit (JDK) software this time by typing.

$ sudo apt install default-jdk

Text Description automatically generated

As you can see from the above image, this command was also executed successfully without asking for a password, and you can also test any other command of your choice.

Conclusion

As a Linux Mint user, it is highly recommended to have credentials that protect your Linux operating system from security intrusions. However, for some people, doing so every time might be tedious, so they look for a solution to avoid it. This is where this article comes to the rescue since it contains all the information you’ll need to install apps without a password. Remember that doing so isn’t a good idea; it should only be allowed if you’re the only one using your computer.

Published
Categorized as Ubuntu