Could you have found this somewhere else on the internet? Sure, but I will be making a series of “cheat sheet” posts to keep stuff I do in Linux on the top of my head and also benefit everyone else as well.
OK so how to make a new user in CentOS 6.6 (im sure this will work in other versions as well) and make that account a root account on your system.
First lets create a new user account (must be signed in as root already) by…
Then give him a password via..
Note be careful not to hit passwd on its own or else Linux will think you’re changing the root account’s password.
Now we’ll need to go into the visudo file by simply typing #visudo
Now scroll towards the bottom of the list where you see the comment that says
## Allow root to run any commands anywhere
Now add the username in the list…
root ALL=(ALL) ALL
wzambrano ALL=(ALL) ALL
Thats it! Now !:wq out and unlike Windows the command takes effect immediately No need to logout and log back in!