Howto add a user with root permission on CentOS 7

Howto add a user with root permission on CentOS 7

CentOS

For any reason, you need add a user with root permission on CentOS 7. It’s not security and not recommend in live system. But we may need that for any urgent support, we can create that based on this topic.

Step 1: Create a new user

useradd kevin

Step 2: Reset password for new user

passwd kevin

Step 3: Grant root permission to new user

visudo

Find the line “root ALL=(ALL) ALL”

Add these lines below that line

kevin ALL=(ALL) ALL

Step 4: Save the file and we can start use new user with root permissions.

Thanks for using IThelpblog.com.

 

 

 

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>