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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Guess if I had read the comments ahead of time, I would have found my answer… <br> <br>Etel says: <br>“This is because you are trying to run visudo as your regular user instead of as root. <br> <br> <br>To access visudo without getting the “Permission denied” result, be sure to switch to the root user: <br> <br> <br>“sudo bash” <br> <br> <br>and then you can run visudo without issue.” <br> <br>So with the new user logged in i did “sudo bash” then “visudo” and it worked just fine :)