How To Add and Grant Sudo Privileges to Users on Ubuntu System
“root” super user is the ruler of the users in Linux/Unix. Having root access give full and unlimited access to the Linux box. I will demonstrate to permit root access to a user in a Linux system. Regularly root level access used as a part of system administrator.
See Also:
This tutorial will help you how to create add new user and provide grant privileges to a new user on an Ubuntu system.
Step #1: Add New User on Ubuntu System
First we add a new user. Run the following command to add new user:
# adduser user_name
Step #2: Grant Root Privileges to the User
By default, new user will only be able to modify files in their own home directory. In order to grant specific user with the root privileges we need to add the user to the sudoers file:
# sudo nano /etc/sudoers Or # sudo visudo
Find the following lines:
# User privilege specification root ALL=(ALL:ALL) ALL
add following line for the corresponding user:
user_name ALL=(ALL:ALL) ALL
If you’ve followed the instruction above correctly, then you should now have a grant root privileges to the user.
Enjoy it!