Questions tagged [sudoers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7 votes
2 answers
13k views

Sudoers NOPASSWD for single executable but allowing others

Operating System: Arch Linux Linux version: 4.16.11 Sudo version: 1.8.23 What I need: be able to execute any executable with a sudo with a password prompt be able to execute one executable, /home/...
Yaroslav Mytkalyk's user avatar
29 votes
3 answers
12k views

sudo command trying to search for hostname

Recently, I have changed the sudoers file and the hostname through /etc/hostname. After changing this files, my sudo command is taking a lot of time. Also, it says sudo unable to resolve host kaagini(...
prathmesh.kallurkar's user avatar
4 votes
5 answers
4k views

a safer no password sudo?

Ok, here's my problem - Please don't yell at me for being insecure! :) This is on my host machine. I'm the only one using it so it's fairly safe, but I have a very complex password that is hard to ...
V_H's user avatar
  • 195
146 votes
12 answers
521k views

How to check if I have sudo access?

I recently got into trouble because of this. $sudo vim /etc/motd [sudo] password for bruce: bruce is not in the sudoers file. This incident will be reported. Is there a way to check if I have ...
Bruce's user avatar
  • 3,147
43 votes
2 answers
57k views

How to allow user to preserve environment with sudo?

I'm running into the following error trying to allow some environment variables to pass through to the new environment when running sudo: sudo: sorry, you are not allowed to preserve the environment ...
Andy Shinn's user avatar
20 votes
1 answer
42k views

What do the "ALL"s in the line " %admin ALL=(ALL) ALL " in Ubuntu's /etc/sudoers file stand for?

What does each ALL mean? I understand that the whole line indicates that the admin group members get admininstartive privileges, but would like to know more info about the position of the ALLS and if ...
Sri Kadimisetty's user avatar
13 votes
2 answers
19k views

sorry, you must have a tty to run sudo

I had already asked this question in Stack Overflow, but I've been asked to post it here. So doing the same. I ran this command using my java program- sudo -u <username> -S pwd I got this ...
AlwaysALearner's user avatar
2 votes
1 answer
4k views

Broken sudo on amazon web services ec2 linux centOS

So I had no idea of the dangers of messing with the /etc/sudoers file, and was just trying to make a simple change in there. However, I seem to have put something with incorrect syntax in there, ...
Evan's user avatar
  • 123
2 votes
1 answer
264 views

Modify sudoers to bypass password requirements but it's not taking effect

I need to run a script with sudo without entering my password. I'm editing /etc/sudoers (using sudo visudo) and on the last line, I'm adding: MY-USER-NAME ALL=(ALL) NOPASSWD:ALL I just want to make ...
Amir's user avatar
  • 125
0 votes
1 answer
53 views

sudo for just one command IN lost+found folder, not more

I have this script # check lost+found folders function chklnf { #DOC echo "chklnf - list any files in lost+found folders on mounted devices" x="lost+found/" if [ "$EUID" != 0 ] ;then ...
Hannu's user avatar
  • 9,337