Linked Questions

287 votes
7 answers
620k views

How to run sudo command with no password?

How does the ubuntu user on the AWS images for Ubuntu Server 12.04 have passwordless sudo for all commands when there is no configuration for it in /etc/sudoers? I'm using Ubuntu server 12.04 on ...
0 votes
0 answers
42 views

/etc/sudoer:1:5: syntax error [duplicate]

Super new at linux, and I want to program robots. I'm trying to work with ROS 2 in Ubuntu 22.04. I installed Ubuntu into a virtualbox with the iso. The very first thing I did without any changes was ...
149 votes
7 answers
175k views

How can I restore configuration files?

I would like to restore LightDM to its default state, because for some reason /etc/lightdm/unity-greeter.conf is now an empty file. Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-...
0 votes
0 answers
35 views

incorrectly edited the /etc/sudoers file and lost sudo priviledges [duplicate]

While trying to figure out why another user doesn't have sudo privileges I got rid of % in %sudo ALL=(ALL:ALL) ALL and after doing I myself cannot lost sudo access. I get the message "xxxx is ...
0 votes
1 answer
838 views

>>> /etc/sudoers.d/python: syntax error near line 1 <<< & based of my mistake in editing python file

I want to run pycharm as root by this instruction and this, but i have made mistake and don't added : in this script: user host = (root) NOPASSWD: full_path_to_python in /etc/sudoers.d/python file. So ...
10 votes
3 answers
27k views

Want to execute sudo command on shell startup

I've put a command sudo do something in my ~/.bashrc, this works but everytime I open the terminal I have to type in my password. How do I make it so there is no password-typing?
0 votes
0 answers
15 views

How to solve NodeJs Ubuntu download issue [duplicate]

I wanted to try host a website through AWS using Ubuntu 18.04 LTS, however I came across this issue when I tried to download Node.js on Ubuntu. ubuntu@ip-172-31-16-206:~$ node -v Command 'node' not ...
1 vote
0 answers
3k views

I edited /etc/sudoers and now I cannot use sudo anymore [duplicate]

I made the following change in the file /etc/sudoers: sudo ALL=(ALL) NOPASSWD:ALL And now I can't use sudo and can't edit /etc/sudoers anymore: /etc/sudoers: near line syntax error 31 <<< ...
17 votes
6 answers
85k views

How to fix sudo after "chmod -R 777 /usr/bin"?

I entered chmod -R 777 /usr/bin and now sudo is not working. It says sudo must be setuid root. Some advice online said to run chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo. On entering ...
0 votes
1 answer
157 views

I have succeeded in messing up /etc/sudoers and /etc/sudoers.d/sudoers. I can no longer access either of these files

entering sudo in a terminal session, I get the following response: >>> /etc/sudoers.d/sudoers: too many levels of includes near line 30 <<< sudo: parse error in /etc/sudoers.d/...
1 vote
1 answer
14k views

Sorry, user xxxx is not allowed to execute '/bin/bash' as root on xxxx [duplicate]

I updated sudoers file with the following line sudo ALL=(ALL) NOPASSWD:/usr/bin/docker after save the changes, I can't run any sudo command and I can't edit sudoers file I get the following error: ...
0 votes
1 answer
168 views

What do I use in place of sudo su to become root? [duplicate]

After I open a terminal, I run sudo su. But it then gives me >>> /etc/sudoers: syntax error near line 27 <<< sudo: parse error in /etc/sudoers near line 27 sudo: no valid sudoers ...
34 votes
2 answers
31k views

/etc/sudoers file corrupted and I can't run 'pkexec visudo' over SSH

Following the instruction here I get: pkexec visudo ==== AUTHENTICATING FOR org.freedesktop.policykit.exec === Authentication is needed to run `/usr/sbin/visudo' as the super user Authenticating as: ...
1 vote
0 answers
83 views

Unable to use any Sudo Commands when restarting, stopping, and starting Samba

I recently made a samba server on an old laptop and that's all I wanted to do with it. About a day ago I was going to use vlc to look for the samba server (I was able to do so before) and couldn't ...
5 votes
5 answers
29k views

Accidentally deleted /etc/sudoers file

I get the following error while trying to update my repositories, avinash@avinash-VirtualBox:~$ sudo apt-get update sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid ...

15 30 50 per page