Sudo provides special privileges to any user or group. Some of the commands are accessible by the root user only. For example, a command to reboot the server. None other than the root user can reboot a Linux system but you want to provide the privilege to your team member, so they can reboot the instance on the absence of you. Then you can assign sudo privileges to that account.
In this tutorial, you will understand how to configure passwordless sudo account on a Linux machine. After completing this tutorial, you can run super user commands (allowed) without entering a password.
- Edit sudoers file using visudo command or use below command.
sudo nano /etc/sudoers
- Add the below line to the file
username ALL=(ALL) NOPASSWD: ALL
Change username with your user account and save file.
All done, to test run any superuser command with sudo. The command syntax will be like: