Adding a user to sudoers list

I had been tired of getting this error for a while in my Ubuntu machine “The user is not in the sudoers list. This error will be reported”. Now this was kind of getting over my nerves so I browsed the internet and got this solution. The sudoers list is available in /etc/sudoers so to edit it login as the root and then edit it by hitting the following command visudo. Now navigate the sudoers file and just under


root ALL=(ALL) ALL

add the following line for eg. if the user is testuser to be given sudo privileges


testuser ALL=(ALL) ALL

now save the file by hitting CTRL X and Y

Advertisements

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