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
118 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
208 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
46 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
481 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
69 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
226 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
70 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 ...
1
vote
3answers
125 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
113 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 ...
40
votes
6answers
3k 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
83 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
92 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
136 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
250 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
47 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
79 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
42 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
1k 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
201 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
57 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
105 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
63 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
184 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
71 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
122 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
34 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
1k 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
338 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
181 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
480 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
185 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
79 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
381 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
60 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
571 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
504 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]# ...
4
votes
1answer
764 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
80 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
471 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
1k 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
176 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
38 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 ...
1
vote
1answer
319 views

Chown in sudoers file : Safe or not?

Is it safe to add this command in sudoers file? mike ALL= NOPASSWD:/bin/chown -R www-data\:www-data /var/www and this is the only command that I want to run $mike@ubuntu: sudo chown -R ...
-1
votes
2answers
518 views

List sudo users in centos

How do I list all sudo users at CentOS server? There are many groups(root, wheel, adm etc) at server, and have users in it. I am looking an easy way/command to find users in all groups who have sudo ...
0
votes
1answer
74 views

I can't make sudo su on old version CentOS with LDAP

I configured many servers with the option to make "sudo su" with ldap users, and works fine. But in 2 servers (CentOS 5.7 and 5.5) this option show me an error: [user] is not in the sudoers ...
0
votes
1answer
56 views

Allow user to run script as root, but not the individual commands within the script

I don't have much experience with this type of task and realize I need to get more familiar with the sudoers file. I want a user to be able to connect via ssh and run a script that performs a bunch ...
1
vote
1answer
174 views

How to create a sudorule in freeIPA for the sudoedit builtin

Currently, when I want to grant some group of users access to edit a file, I proceed as follows: ipa sudocmd-add --desc=Vi IMproved default-mode, no-exec, no-suspend mode' '/usr/bin/rvim' ipa ...
0
votes
1answer
460 views

sudoers nopasswd switch user and run node not working

I'm trying to prevent a password prompt on a command that runs node as the www user by adding the following line to the bottom of my /etc/sudoers file: gituser ALL=(ALL) NOPASSWD: /usr/bin/sudo -u ...
0
votes
1answer
147 views

Recommendations for bootstrapping Ubuntu server

When I create new Ubuntu 12.10 instances, I typically bootstrap them by manually SSHing onto the machine and editing the sudoers to put a NOPASSWD on the default user (e.g., ec2-user, azureuser, ...