Creating User, Group and adding Group to sudoers in CentOS

1. Creating a group

groupadd testers

2. Create a user under the group

useradd -mg testers tester -s/bin/bash

3. Set password for the user

passwd tester

4. Add the user to sudoers list

visudo (command to open sudoers file. Dont open /etc/sudoers file in VI edior)

add this line to give the above group with full sudo access.

%testers ALL=(ALL) ALL

All done.

Leave a Reply

Your email address will not be published. Required fields are marked *