Question

After creating an additional user with root priveledges, I get errors that I do not have permissions.

Posted December 14, 2013 2.4k views
I guess I should first say I'm not a programmer, but I can "hack" my way through this stuff. So... I followed the Initial Server Setup Tutorial: https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04 . After creating the user and adding: "newuser ALL=(ALL:ALL) ALL" below the: "root ALL=(ALL:ALL) ALL" line and I ssh in using the newuser, I am unable to pull up visudo and receive the following error: "visudo: /etc/sudoers: Permission denied" Any help is appreciated. Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer
Guess if I had read the comments ahead of time, I would have found my answer...

Etel says:
"This is because you are trying to run visudo as your regular user instead of as root.


To access visudo without getting the "Permission denied" result, be sure to switch to the root user:


"sudo bash"


and then you can run visudo without issue."

So with the new user logged in i did "sudo bash" then "visudo" and it worked just fine :)
Submit an Answer