Linux has a tough permission rule. Being a root user you are permitted to do anything however the normal user has only some allowed permissions. To run many other commands, they required to ask permissions from the superuser, using keyword sudo after which they need to enter the password.
This requirement of the password after sudo command can be removed using the following steps:
Step 1: Edit sudoers file using the following command
sudo gedit /etc/sudoers
Enter the password, it will open text-editor with sudoers file as follows:
Step 2: Find a line which contains includedir /etc/sudoers.d, press Ctrl + F and paste includedir /etc/sudoers.d
Step 3: Below the line includedir /etc/sudoers.d add the following
username ALL=(ALL) NOPASSWD:ALL
where username is your username.
Save your changes Ctrl + S and exit. From now, you will be able to execute sudo any_command without providing a sudo password.
- How to create a Shared Folder between two Local User in Linux?
- mindepth and maxdepth in Linux find() command for limiting search to a specific directory.
- Linux Operating System | CLI (Command Line Interface) and GUI (Graphic User Interface)
- sudo command in Linux with Examples
- How to install, configure and use GIT on ubuntu?
- How to Install and Configure Docker in Ubuntu?
- Installing and Configure vim Plugin in Ubuntu
- How to Install and Configure Fish Shell in Ubuntu?
- Linux Virtualization : Linux Containers (lxc)
- User Interface (UI)
- Detection of a specific color(blue here) using OpenCV with Python
- Fetch top 10 starred repositories of user on GitHub | Python
- Creating a Cell at specific position in Excel file using Java
- Why overriding both the global new operator and the class-specific operator is not ambiguous?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.