Add New User to Sudoers Group - CentOS 7

Mindwatering Incorporated

Author: Tripp W Black

Created: 09/25/2015 at 06:37 PM

 

Category:
Linux
Other

Objective:
Add a new local administrative user to a CentOS 7 machine.

Steps:
1. Add the new user "JohnDoe":
# useradd -m johndoe -d /home/johndoe

2. Add user to wheel group
(assuming wheel is in the /etc/sudoers file for sudo access)
# gpasswd -a johndoe wheel

3. Give user stating password
# gpasswd johndoe
> enter1reallyH@rdPwdas@%!@%#@%
> enter1reallyH@rdPwdas@%!@%#@%

4. Have user login and test
johndoe $ sudo uname -r
> enter1reallyH@rdPwdas@%!@%#@%
<release of linux is displayed>


previous page

×