Create a root user with password in Red Hat Linux (RHEL)

Posted By: Matpal - March 27, 2018
Followings are the steps to create a root user in Red Hat Linux

Step 1 : Create a user

# useradd jhonsmith

Step 2: Set password 
Add a password. The system will ask you to re-type the password to confirm.

# passwd jhonsmith

Step 3 : Update sudoers file

# vi /etc/sudoers

 Add the following after root entry. 
 root    ALL=(ALL)       ALL
jhonsmith ALL=(ALL) NOPASSWD: ALL 

Save and exit.


Post a Comment

Note: Only a member of this blog may post a comment.