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…

#adduser wzambrano

Then give him a password via..

#passwd nycnetworkers

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!

William Zambrano

William Zambrano

NYC networkers is run by William Zambrano, a passionate network engineer who has been in the IT industry for eight years who posts up blog articles, YouTube videos, and holds events in the NYC area. He lives in Queens, New York and has consulted in various different companies in the NY area. Previously William worked as a Cisco Certified Systems Instructor (CCSI) but now currently works for Arista Networks serving as a Systems Engineer. William can be reached by email at

More Posts - Website

Follow Me: