You are currently viewing Add a User and Grant Root Privileges on CentOS 7​

Add a User and Grant Root Privileges on CentOS 7​

  • Post author:
  • Post category:Linux

Add a User and Grant Root Privileges on CentOS 7

It’s just one simple command to add a user. In this case, we’re adding a user called newuser :

# adduser newuser

# visudo

Find the following code:

## Allow root to run any commands anywhere
root ALL=(ALL) ALL

In this case, we’re granting root privileges to the user newuser . Add the following below that code:

newuser ALL=(ALL) ALL

 

Then exit and save the file and that’s it!