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