How to add a user then grant root privileges on CentOS 6.8

Vuong Tran
1 min readAug 14, 2016

--

Step 1: add a user

It’s just one simple command to add a user, in this case I adding a user botuser

$ adduser botuser

Set password for botuser

$ passwd botuser

Step 2: grant root privileges for botuser

It’s just one simple command

$ visudo

Find the following code:

## Allow root to run any commands anywhere

type the code below then save and exist using command :wq!

botuser ALL=(ALL) ALL

For now, you have a botuser can use root to run command as root.

That’s it!

--

--