Sometimes, you would need to give sudo privilege to many users. For providing sudo privilege for a single user, refer the following post.

 

—–

https://blog.pheonixsolutions.com/wheel-user-to-become-as-root-su-without-password/

—–

 

For providing sudo privilege for many users, create a group and add all the users in that group. So, if we give sudo privilege for that group then all the users will get the sudo privilege.

The following guidelines will help you to perform the above mentioned task.

+ Creating a user with group.

useradd -G testgroup username1

useradd -G testgroup username2

Simlarly, you can add multiple users to the group.

Now, adding the group to the sudoers file.

 

visudo

Add the following content in that file. You will have to change the groupname with your own group name.

%testgroup  ALL=(ALL)  NOPASSWD: ALL

 

NOPASSWD is used to login to the server without asking for the password.

 

Leave a Reply