windows, vmware, linux and whatever else confuses me…

Adding users to sudoers file (Linux)

leave a comment »

Yeah I’m a newbie to linux so anyways I ran into an issue where my new user account in Centos could not sudo anything because I was not added in the sudoers file (ie. /etc/sudoers). So here’s how you do it:

(Assuming you’re logged in as root making this change)

#vi /etc/sudoers

Scroll to the bottom until you see “## Allow root to run any commands anywhere“. Add the following line under “root            ALL=(ALL)     ALL“:

user_name            ALL=(ALL)     ALL   (where as user_name is the username you added in Linux)

Make sure you save the file using the appropriate VI commands

Advertisements

Written by thlnk3r

February 9, 2012 at 08:51

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: