sudoers is the default configuration file to store sudo security policies governing the rights of users to run commands with elevated or alternate permissions.

learn more… | top users | synonyms

-2
votes
1answer
55 views

How to make sudo -u not require password [on hold]

I'm using ansible with vagrant and ansible is trying to sudo as postgres user to run some postgres commands. Ansible running as vagrant user seems to run something like sudo -u postgres psql This ...
-1
votes
1answer
32 views

How to pass the SSH_AUTH_SOCK through sudo (Permission denied (publickey).) [duplicate]

I have a Ubuntu server with the users: ubuntu and user I connect to each of the users using ssh -A (to pass my local machine keys to SSH). From any of the users I can connect to the SSH server of ...
0
votes
1answer
57 views

Setting up Sudo in CentOS-7

In CentOS 6.5, i would do the following to setup sudo for users - useradd -G wheel -c "John Smith" jsmith visudo uncomment this line - %wheel ALL=(ALL) ALL usermod -G wheel -a jsmith restart ...
0
votes
1answer
30 views

Visudo Gives no Error but asks “What Now?”

I'm trying to add a new sudoers file using sudo visudo -f /etc/sudoers.d/abe . I added the contents: # Allow automatic update of abe matt ALL=(root) NOPASSWD: python /home/matt/token-abe/setup.py ...
0
votes
2answers
102 views

Sudo without password issue

Having a problem with sudo. As the user forge I want to be able to run sudo service php5-fpm reload without having to type a password. I've tried all of the variants below. forge ALL=NOPASSWD: ...
-2
votes
1answer
43 views

create file with sudo but have ownership as current user [closed]

I am on centos 6.5. I have a limited user. I gave the user some specific rights via sudoers. Lets say its user1. I want user1 to create a file in a directory where he has ownership. Therefore I run ...
-2
votes
3answers
100 views

Enable Passwordless Sudo with Arguments

I am trying to enable passwordless sudo for updating yum on a RHEL box. I have the following line in sudo visudo. myuser ALL=(ALL) NOPASSWD: /usr/bin/yum update After doing this under myuser I am ...
3
votes
1answer
237 views

sudo still ask for password when NOPASSWD is used

I read all sudo posts on serverfault, but I still cannot figure out what I'm doing wrong. Normally I finally find the solution but not this time : I want apache user to be able to execute this ...
7
votes
1answer
234 views

Linux/Unix - /etc/sudoers - host definition

can anybody tell me in which case the sudo host definition is useful? I mean this part of a line in the sudoers file: bob host1 = NOPASSWD: reboot In which environment (except sudo via LDAP) do I ...
2
votes
2answers
66 views

Configuring sudo to not prompt for password on non-allowed commands

There is plenty of information on how to make sudo not prompt for passwords (NOPASSWD). Let's say I have user alice, and this line in my sudoers: alice ALL=(root) NOPASSWD: /bin/myadmintool This ...
13
votes
3answers
499 views

Which method to use for granting sudo

What is the difference between adding a user to /etc/sudoers and usermod -a -G sudo? Which method should be used for granting sudo?
1
vote
4answers
184 views

How do I use saz-sudo puppet module to deploy my own sudoers file with hiera?

I have saz-sudo installed and have created a site_sudo module based (I hope) on it. Here's what I have in my site_sudo/manifest/init.pp file: class { 'site_sudo': } sudo::conf { 'web': ...
1
vote
4answers
415 views

Fedora, ssh and sudo

I have to run a script remotely on several Fedora machines through ssh. Since the script requires root priviliges, I do: $ ssh me@remost_host "sudo touch test_sudo" #just a simple example sudo: no ...
1
vote
1answer
125 views

Sudoers NOPASSWD how to grant access to a specific ln command

In /etc/sudoers I need to grant passwordless sudo for this command: /usr/bin/env sudo ln -nfs /home/deployer/apps/myapp_staging/shared/config/nginx.conf /etc/nginx/sites-enabled/ to the deployer ...
2
votes
3answers
2k views

nagios nrpe unable to read output

I'm trying to use check_nrpe to check on a remote server, but it's not working and I can't figure out what am I missing... # /usr/lib/nagios/plugins/check_nrpe -H XXX -c check_load -a 6,5,4 8,7,6 ...
-1
votes
1answer
260 views

How to set “sudoers” in nsswitch.conf on Solaris-11

I am doing this on Solaris 11. When i open '/etc/nsswitch.conf' i see this - ... sudoers: files ... I would like to change this to - ... sudoers: files ldap ... I tried editing the file ...
43
votes
8answers
4k views

Is it OK to set up passwordless `sudo` on a cloud server?

Sorry if the question is vague but I don't know a better way to ask and I didn't see the caveats/tradeoffs of the approach discussed here. I love the idea of accessing servers via keys, so that I ...
2
votes
1answer
129 views

mongodb 2.4.9 is crashing on wheezy when running as root

I installed mongodb-10gen v2.4.9 on a debian Wheezy, and I'm having this really weird behavior: if I run it as root I can't get it starts: root@xx:~# /etc/init.d/mongodb stop [ ok ] Stopping ...
2
votes
4answers
133 views

program needs to be run as root by any user and can be located anywhere

I have some program called foo that needs root privileges when it executes. foo needs to be able to be run by any user and can be located at any path. The reason this program can be at any path is ...
2
votes
2answers
159 views

remove specifying the full path in sudoers

I am trying to add a NOPASSWD entry for 'sudotest.sh' (or any script/binary that requires sudo) in my /etc/sudoers file (redhat) but in order to make it work, I must specify the full path. The ...
2
votes
1answer
271 views

User not in sudoers, but still can use sudo

I have a user user1 that is not in the sudoers file (nor belonging to groups in sudoer) but can still use sudo. How is it possible ? user1~$ groups user1 www-data My sudoer conf ...
0
votes
1answer
66 views

Sudo Command Alias option equivalent in OpenLDAP

I have an OpenLDAP installation that manages Sudo as well. Everytime I create a sudoers role, I have to list the commands that that sudoers role can run. This leads to a lot of repetition. Is there ...
2
votes
1answer
101 views

Strange PATH when use sudoers via ldap

I have a working LDAP authentication environment. LDAP server is on ubuntu 12.04 machine while client are all centos 6.4 machines. Recently I configure sudoers in LDAP following this article ...
2
votes
1answer
46 views

sudoers entry allowing group to run as group with no password

I want to add an entry to sudoers that will allows users in the group test to run any command on any host as the group test (i.e., with sudo -g test, without having to type a password. I've tried a ...
4
votes
1answer
2k views

Using FreeIPA for centralized sudo - using SSSD for sudoers

I have setup FreeIPA for centralized sudo and all is working well with the exception of being able to use SSSD for sudoers. If I have in my client /etc/nsswitch.conf the following: sudoers: files ...
3
votes
1answer
396 views

Using FreeIPA for centralized sudo - how to specify ALL commands?

I'm having a hard time wrapping my head around FreeIPA's model. The FreeIPA manual states: FreeIPA adds an extra control measure with sudo command groups, which allow a group of commands to be ...
-2
votes
1answer
59 views

How to edit sudoers file in ubuntu [closed]

I accidentally changed the mode of the file /etc/sudoers and added a line to the file. Now every time I want to "sudo", I got a error message like "parse error in /etc/sudoers near line 21" I ...
-1
votes
1answer
236 views

sudo su - <username> should be possible but sudo su - shouldn't be for sudo user

There is a requirement I got. My sudo users (for which their entry in sudoers file) should be able to access other user's account say Oracle using following command: sudo su - Oracle The above ...
0
votes
1answer
92 views

Executing a command as apache

This script keeps outputting a 1. and I cannot understand why. <?php passthru("nohup sudo rndc reload sd.example.com",$op); print_r($op); ?> I have also tried the above code ...
2
votes
4answers
208 views

User with root privileges to restart a service can't

I want a user to be able to restart the php5-fpm service. In visudo, I have the following: username ALL=NOPASSWD: /etc/init.d/php5-fpm When I su to the user and run sudo /etc/init.d/php5-fpm stop, ...
0
votes
2answers
73 views

many unknow process name as “sudo”

my server free memoney is less and less, And many process COMMAND are"sudo" when use top and enter M. I don't understand root user need to use "sudo". I want to know the way these processes are ...
-1
votes
1answer
221 views

sudo to other user doesn't preserve DISPLAY variable

I've got an /etc/sudoers file that works just fine in all versions of Fedora prior to F18, but we've noticed that when upgrading to F18 (and installing FreeIPA, though the cases I'll show here were ...
0
votes
0answers
39 views

visudo passes syntax check but the file fails when put into place

I've been trying to create a modified sudoers file in /etc/sudoers.d/ but am having trouble. visudo -cf /file/path shows no syntax issues, but when i mv /tmp/sudoers/ /etc/sudoers.d/sudoers sudo ...
2
votes
1answer
2k views

sudo still ask for password when NOPASSWD is used

I want to run this script (it is post-receive hook of git repository): #!/bin/sh echo "Executing post-receive hook as user `id` using `which sudo`" sudo -l sudo -n bash ...
1
vote
4answers
494 views

How to fix sudoers file on virtual machine without root and reboot

I've broken my sudoers file on a heavy loaded server with a syntax error. And unfortunately I've lost my root password. The server is critical and I'd like to avoid rebooting. So, no sudo, no root, no ...
2
votes
1answer
227 views

sudo: PAM audit_log_acct_message() failed: Permission denied

.. any time I'm run sudo through NRPE, I'm get a following message in my /var/log/secure, and I can't figure out how to resolve it. sudo: PAM audit_log_acct_message() failed: Permission denied ...
0
votes
4answers
518 views

How to make bash script executable for a user, but not readable

I'm trying to run a script at login that will execute for a regular user, but not be readable by that or other non-root users. I've tried various things including chmod/chown combinations, as well as ...
3
votes
1answer
300 views

Adding group to sudoers has no effect

I'm trying to grant the www-data group access to certain commands under sudo (ie to restart Apache) and I'm having no luck. I spent the majority of Friday looking into this issue and must have looked ...
-2
votes
1answer
54 views

sudo -u … -i doesn't preserve a user's PATH

I'm trying to determine a user's path when I'm root, but sudo, even with the -i flag, doesn't seem to replicate the user's environment correctly. Is this some sudoers policy setting? $ sudo bash # ...
1
vote
1answer
99 views

With sudoers, how can I allow a user to change the group of files/folders within their home directory?

I have a webserver where apache runs as www-data. Users are set up using chef, and some of their file/folder permissions are set to group: www-data, e.g. uploads folders. Deployments are done with ...
0
votes
1answer
528 views

After updating sudoers user still does not have access to sudo

I'm having problems adding a user to the sudoers list via the /etc/sudoers file. $ whoami iain And they said I was crazy! $ which visudo /usr/sbin/visudo $ ls -la /usr/sbin/visudo ---x--x--x 1 ...
1
vote
0answers
62 views

Does my deploy user need to belong to the sudoer list for Upstart to start GUnicorn?

Does my deploy user need to belong to the sudoer list for Upstart to start GUnicorn? Here is the error from my Upstart log deploy is not in the sudoers file. This incident will be reported. It ...
1
vote
3answers
864 views

Using a non-root to deploy a git repo to the web root

What is the best way to set up users and permissions for a production web server that uses git to deploy to the server? Background Running Ubuntu 12.04, I have apache severing files under /var/www ...
0
votes
2answers
612 views

NRPE Issue Unable to Read output Check_Access_Log

In NRPE running xinetd I am able to run the script locally, but NRPE reports unable to read output when trying to run it remotely. Any suggestions?: [root@travel log]# ...
8
votes
1answer
1k views

AWS - removing ec2-user from sudo list

I'm running a production-level Amazon ec2 instance, and I want to close out root privileges to all users. Normally, when one logs in to the instance as ec2-user, the ec2-user immediately gets sudo ...
0
votes
1answer
102 views

Configure LDAP for SUDO Support on Ubuntu Server 12.04

I'm running into some issues finishing my LDAP install. I used the following article to try the sudoers schema configured: http://ubuntuforums.org/showthread.php?t=1421998 When I run ldapadd -x -D ...
1
vote
1answer
691 views

winbind separator and group name behavior in getent group, constantly changing

I have a problem that occasionally apprears-dissapears and it drives me nuts. My Debian servers are authenticated against AD and only "linuxadmins" group member can SSH to server and "sudo su". SSH ...
1
vote
2answers
2k views

Best practices to avoid Jenkins error: sudo: no tty present and no askpass program specified

When running any sudo command from Jenkins I get the following error: sudo: no tty present and no askpass program specified I understand that I can solve this by adding a NOPASSWD entry to my ...
0
votes
1answer
250 views

How to avoid specifying full path in sudoers file?

I am trying to add a NOPASSWD entry for sudotest.sh (or any script/binary that requires sudo) in my /etc/sudoers file (on Ubuntu 12.04 LTS server), but in order to make it work, I must specify the ...
0
votes
1answer
47 views

Saved Kitty Password Extraction

I am having a ubuntu server and forgot the root password. I could not find the pass in any documentation (My fault). Now I have another user which is in the sudo list but the password of that user is ...