Questions tagged [visudo]
visudo edits the sudoers file in a safe fashion
25
questions with no upvoted or accepted answers
3
votes
0
answers
2k
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
0
answers
3k
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
...
2
votes
1
answer
628
views
sudoers doesn't work
I added powertop to /etc/sudoers (sudo visudo) but it doesn't work. I checked all possible problems I can imagine. What did I missed?
user@ellie:~$ whoami
user
user@ellie:~$ groups
user adm cdrom ...
2
votes
0
answers
29k
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 ...
2
votes
1
answer
583
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.
1
vote
1
answer
683
views
NOPASSWD option not working in sudoer file
I know this has been asked before, but I tried answers from dozens of other posts, and nothing is working. I've also used this on other servers successfully, so I'm not sure what I'm doing wrong this ...
1
vote
1
answer
174
views
Allowing {USER} to run a command against a process owned by another user
I have been scouring the forums to find out how you can allow a command / process to be ran by a user that is normally only permitted by root or itself.
There are some good resources out there but ...
1
vote
1
answer
177
views
Messed up the sudo access!
Not sure if this is the place for troubleshooting, but I am gonna give it a shot.
I was trying to make my computer turn off without needing sudo, and I must have done something wrong because I get a ...
1
vote
0
answers
486
views
In which cases multiple hostnames are set/uses with sudo
My computer has a label/hostname, let's say learn_linux.
In the /etc/sudoers the format is:
user ALL=(ALL:ALL) ALL
%group ALL=(ALL:ALL) ALL
the first field -> user, %group is referring to ...
1
vote
0
answers
1k
views
user in sudo group can't run sudo
I've seen other similar questions but they don't solve my problem unfortunately.
I've been added to the sudo group on my Ubuntu 14.04 with
usermod -aG sudo testuser
but I still can't run sudo:
:~...
1
vote
1
answer
633
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: /etc/sudoers....
0
votes
0
answers
233
views
Sudoers, Specific Programs & Said programs arguments
I have a /etc/sudoers.d file which I want to run a program (asterisk) WITH arguments as a user (zabbix). So far I have tried:
zabbix ALL = NOPASSWD: /etc/path/to/my/script.sh
And
zabbix ALL=(ALL) ...
0
votes
1
answer
60
views
In what line of sudoers do I put this?
%newgroup, !newuser ALL=(ALL:ALL)NOPASSWD:ALL, !/usr/sbin/iptables
I have read that it is put at the end, but I am not sure about it
0
votes
0
answers
566
views
Visudo NOPASSWD not working on specific file
I'm trying to exclude one script I wrote from asking the password when executed, even if it contains a "sudo" command
so i've edited sudoers through visudo adding
myuser ALL=(ALL) NOPASSWD: ...
0
votes
0
answers
139
views
Ubuntu 21.04 Broke Passwordless SSH Shutdown
I recently had passwordless SSH shutdown and reboot working on Ubuntu 20.04, but after upgrading to Ubuntu 21.04 it no longer works.
I have key based authentication set up correctly, and can ssh into ...
0
votes
1
answer
320
views
How to bypass sudo password for everything inside a script?
I have a PADD setup on my Raspberry Pi 3 running on Ubuntu Server 20.04.
I can successfully bypassed sudo password authentication by adding:
pihole_display ALL=(ALL) NOPASSWD:ALL
But when I try to ...
0
votes
1
answer
966
views
user is not in the sudoers file
Once configured my VM with Ubuntu 18.04 and joined to an AD domain, when trying to do sudo operation with my domain user, the error message is always:
"domainuser is not in the sudoers file. this ...
0
votes
2
answers
1k
views
How to run "systemctl" + $ + "apache" $=stop,start,restart as non sudo/root user?
Yeah basically the title,
I want to do that things from a app that can run Linux scripts per SSH.
I only want to run these three and not ALL from systemctl with my basic user.
So thanks.
0
votes
1
answer
74
views
Configure a group to change date via GUI without admin privileges
On Ubuntu 16.04, I would like to create a group of users, named "group_1", without admin privileges who would be able to change the date.
To do so, I use the command visudo and add the line :
...
0
votes
1
answer
879
views
how to edit sudoers file and pass a file which contains list of commands instead of commands list in sudoers file
I need to edit visudo file to allow users to access certain commands.
If i edit visudo file to add some commands, then i have to edit visudo file very frequently .
Instead of editing visudo file I ...
0
votes
0
answers
412
views
WSL: visudo -c complains "parse error"
I'm having a problem trying to set a sudoer file in WSL.
So, I created a file /etc/sudoers.d/wheel containing the following one line:
%wheel ALL = NOPASSWD: (ALL:ALL) ALL
But whenever I run visudo ...
0
votes
0
answers
458
views
How can I configure visudo to run a script with root privileges for a non root user?
I need than a deployer (member of group deploy) can run some scripts with root priviegies. But I dont want that deployers can run anythig. I try this.
With a root user I do:
~$ echo "touch /opt/expe/...
0
votes
0
answers
876
views
sudo environment variables disappeared
Symptom:
user1@ubuntu:~$ printenv PATH
/system/company/root/bin:/usr/lib/icecc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/system/company/scripts:/opt/puppetlabs/bin
...
0
votes
0
answers
1k
views
Avoid password prompt while using minicom
I have the following python code where I am trying to open the device /dev/ttyUSB5 using minicom:
import serial
import os
b1_ser_port_num=5
cmd="/dev/ttyUSB"+str(b1_ser_port_num)
print "We are now ...
0
votes
1
answer
290
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 ...