visudo edits the sudoers file in a safe fashion

learn more… | top users | synonyms

1
vote
1answer
63 views

Upstart for docker and setuid permissions

OK, this has kept me busy for a day at least, since last night. I am trying to do something very simple: run a bash script which creates a few folders and runs a docker container - but using upstart. ...
1
vote
0answers
18 views

timestamp_timeout in Ubuntu doesn't work

I use ubuntu 14.04 and I tried to change sudo password timeout but change made to it doesn't work. Please help , My visudo file looks like this. GNU nano 2.2.6 File: ...
0
votes
0answers
103 views

Sorry, user is not allowed to execute X as root on lt

Whenever I try to run a command from the termainal as sudo, I am now getting the error: Sorry, user {user} is not allowed to execute {command} as root on lt. lt is the name of my computer. The only ...
3
votes
2answers
239 views

Certain commands not working for a user with sudo after adding to `sudoers` file

I cannot seem to allow the user (In this case Ruby) to run sudo rm -rf, sudo rmdir, or sudo mkdir. I have tried it with other commands and it works fine allowing that user to run sudo apt-get update ...
1
vote
1answer
31 views

Explanation of visudo lock file

When I edit /etc/sudoers using visudo, I think it saves to sudoers.tmp, checks it for errors, then copies it to the real /etc/sudoers. However, I can't confirm my theory (how the lock file is used) ...
3
votes
1answer
40 views

Must use 'visudo'?

In /etc/sudoers, it is said "This file MUST be edited with the 'visudo' command as root." My question is why must this file be edited with 'visudo'. It seems I was able to edit the file successfully ...
-3
votes
1answer
138 views

How can I edit the sudoers file since visudo command doesn't work properly [duplicate]

i tried to edit the etc/sudoers ,while trying to add myself to the sudoers file,but I'm unable to edit it. As I entered the command visudo the following came as output $ visudo visudo: ...
2
votes
0answers
71 views

Reset sudoers file

I want to add a new user to run all commands without a password, so I went to edit /etc/sudoers (using visudo of course) by adding the line myuser ALL=NOPASSWD: ALL. Everything is OK, but 15 minutes ...
3
votes
1answer
1k views

sudo: can't open /etc/sudoers: Permission denied [duplicate]

sudo from a standard user works fine, but when I try to use it from root it returns this error: sudo: can't open /etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting ...
0
votes
1answer
92 views

Allow nopasswd sudo for specific user

I am trying to set the scp as a specific user with NOPASSWD. alice ALL = (bob:ALL) NOPASSWD: /usr/bin/scp As I did understand from this question. However when I save using my visudo I still can't ...
1
vote
1answer
253 views

visudo: specified editor (./sudo_editor) doesn't exist

I tried to run the "sudo EDITOR=./sudo_editor visudo -f /etc/sudoers.d/relax_requirements" command and the error came out as: visudo: specified editor (./sudo_editor) doesn't exist Anyone know what ...
5
votes
2answers
6k views

How to change visudo editor from nano to vim? [duplicate]

When I use visudo, it always opens it with nano editor. How to change the editor to vim?
0
votes
0answers
169 views

When running a shell script using sudo I am getting no tty present and no askpass program specified

I am trying to build a project using jenkins. The project is based on node. I wrote a shell script that has only npm install command. I am running the shell script from jenkins as sh ...
9
votes
1answer
1k views

Change the default editor when sudo visudo

When doing sudo visudo, the default editor is nano. I want to change it to vi or vim. I already made vim be the default application to replace gedit upon opening php, plain text, c and h files, by ...
1
vote
2answers
337 views

Auto-starting a GUI application that requires sudo

Question: I need to auto-start a GUI application that requires sudo. I know I need to edit the sudoers file with: sudo visudo However, I don't know what to write in the file. What I already ...
1
vote
1answer
111 views

/etc/sudoers file problem understanding

According to the documentation, modifications of this file may enables local users to execute sudo commands on remote machines: user1 192.168.1.14=(user2:group1) ALL According to what I read, ...
0
votes
1answer
804 views

I can't add myself(default user) in sudo group in ubuntu [duplicate]

I accidentally changed my primary group using the following command. sudo usermod -g localgroup shantanu #shantanu is my username I interrupted this process as soon as I realize what is happening. ...
1
vote
1answer
274 views

Changes to sudoers have no effect. Following basic Ubuntu tutorial

I'm following along the Ubuntu sudoers tutorial. Here's my exact /etc/sudoers file (screenshot instead of code block because the formatting was getting messed up). Notice the lines at the bottom ...
1
vote
1answer
2k views

Mount samba share at login using startup script (not fstab)

Background I'm trying to automatically execute a command that mounts a password protected Samba share when my user logs in. The catch is, I share my laptop with another user, and I don't want the ...
0
votes
1answer
114 views

Shutdown launcher withouth password

I added new launcher to panel using this command for shutdown: gksu telinit 0 When I wanted to get rid of constant inserting of password, I did not succeed. I opened visudo and added line "username" ...
1
vote
0answers
43 views

Lost visudo - I seem to have lost visudo, to my great surprise

Lost visudo I seem to have lost visudo, to my great surprise. I'm trying to add to /etc/sudoers or /etc/sudoers.d but when I try and run visudo as root I get this sudo: visudo: command not found ...
1
vote
2answers
995 views

Xubuntu visudo sudoers edit not working

I have been trying to specify a script that I would like to run without being prompted for a password. After a number of google and stack searches and a number of different syntax changes, I still ...
2
votes
3answers
944 views

Run a specific sudo command without a password in Ubuntu 13.10

I would like to run vagrant without being prompted for a password. As this post suggests, I used visudo to add the following line to my sudoers file. john-moz ALL=(ALL) NOPASSWD: /usr/bin/vagrant ...
1
vote
1answer
54 views

Changed suoders to an account that doesn't exist, what should I do

I've installed ubuntu 12.04 with single user, let's call him user1. I then created a new user, let's call him user2. I wanted user2 to be the only user with sudo rights, so I removed all users from ...
0
votes
1answer
63 views

Visudo not working for specified files

I am trying to give sudo ability without the need of passwords to specific files. So far I have: employee ALL=(ALL:ALL) NOPASSWD: /home/file_name The file has a simple chmod command, in the bash ...
0
votes
1answer
122 views

visudo crashing on making changes

I am attempting to add an entry to visudo: admin ALL=(ALL) /bin/kill I have attempted to make changes to this in the past but crashed the visudo file. Can someone assist in telling me where ...
1
vote
3answers
107 views

Do I have to do a new installation?

I was in the /etc/sudoers and might done something wrong, beacuse after I couldn´t use the commandline again. Maybe i deleted sudo in /etc/sudoers. It said something was wrong i line 28. What can I do ...
7
votes
1answer
400 views

How disable mysql command in sudoers file?

How can I disable /usr/bin/mysql command in sudoers file? I've tried to use it this way: %tailonly ALL=!/usr/bin/mysql But when I access user 'tailonly' of group 'tailonly', this command is still ...
2
votes
1answer
340 views

Is there a GUI to `visudo`?

Quite simply, is there a GUI to visudo I can recommend to other users, and use for myself? I have to set up a system where over 50 users have different sudo privileges and I need to juggle them all.
-6
votes
1answer
2k views

How to sudo visudo without a password, remove all prompts for password [closed]

Websites tell me to use sudo when I have no password, usually tell me one of two things. It is bad security Or use 'sudo visudo' and the %admin ALL=(ALL) NOPASSWD: ALL line I would like to not ...
39
votes
3answers
6k views

What are the differences between sudo, su, visudo, chroot, and gksu?

What are the differences between sudo, su, visudo, chroot, and gksu ?
105
votes
12answers
136k views

How to modify a invalid /etc/sudoers file? It throws out an error and not allowing me to edit again

How do I edit an invalid visudo file? Here is what happens: $ sudo visudo >>> /etc/sudoers: syntax error near line 28 <<< sudo: parse error in /etc/sudoers near line 28 sudo: no ...