The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
23 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 ...
3
votes
4answers
6k views

Allow Apache to run a command as a different user

I have a script that executes several commands in a user's home directory. The files are owned by the user and Apache (the www-data group) only has read privileges to them. The script needs to be ...
0
votes
3answers
1k views

Running a command through a tty without commenting out “requiretty”

I'm running the latest version of Jenkins on CentOS. In my Jenkins job, I can run post build steps, and included this command, sudo /bin/rm /usr/java/jboss/server/default/deploy/myclient-1.0.war ...
39
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
44 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
63 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 ...
13
votes
12answers
17k views

Why does sudo command take long to execute?

I've been picking up Linux (Fedora 10, then 11) over the past few months (and enjoying it immensely-- it's like discovering computers all over again, so many things to learn). I've added my user to ...
2
votes
2answers
126 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
223 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
0answers
31 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
40 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 ...
4
votes
1answer
430 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 ...
2
votes
1answer
39 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 ...
9
votes
8answers
17k views

using su inside of a shell script

I'm automating a deploy process and I want to be able to just call one .sh file on my machine, have it do my build and upload the .zip to the server and then do a bunch of stuff on the server. One of ...
3
votes
1answer
86 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
51 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 ...
2
votes
4answers
146 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, ...
-1
votes
1answer
61 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
53 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 ...
0
votes
2answers
62 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
70 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
29 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
431 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 ...
2
votes
1answer
135 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 ...
1
vote
4answers
193 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 ...
0
votes
4answers
410 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
119 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
48 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
64 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 ...
6
votes
2answers
3k views

Is it possible to use sudo with !requiretty for a specific command

I am trying to allow a specific command to be run under sudo without a tty. I found that I can disable requiretty for a group : Defaults:%support !requiretty But I dont know how to do it for a ...
0
votes
1answer
269 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
53 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
347 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
428 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]# ...
0
votes
1answer
65 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 ...
3
votes
1answer
378 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 ...
1
vote
1answer
331 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 ...
0
votes
1answer
788 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
108 views

How to avoid specifying full path in linux 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
35 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 ...
2
votes
2answers
3k views

Limit sudo to only one directory and it's subdirectories by sudoers file

So I would like to limit Apache to only change permissions in a certain folder and all of it's sub-directories, so this is what I have in my sudoers file apache ALL= (ALL) NOPASSWD: /bin/chmod -R ...
1
vote
1answer
181 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
340 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
63 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 ...
2
votes
2answers
615 views

Upgrading from OS X 10.7 to 10.8 broke sudo

The following /etc/sudoers entry worked under Mac OS 10.7, but prompts for a password under 10.8: username ALL=NOPASSWD:/usr/libexec/dovecot/deliver I assume that Apple upgraded to a newer sudo; ...
1
vote
1answer
142 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
52 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 ...
32
votes
1answer
38k views

sudoers: how to disable requiretty per user

I don't want to uncomment the line in /etc/sudoers: Defaults requiretty Instead, I only want a certain user not to require a tty. How can this be done?
5
votes
4answers
4k views

Ubuntu : borked my sudoers file, how can I fix it?

I was editing my /etc/sudoers file and saved it but it has a syntax error in there. Now I can't 'sudo vim /etc/sudoers' because sudo thinks the sudoers file is not valid. How can I fix this?
23
votes
4answers
25k views

How to setup passwordless `sudo` on Linux?

How can passwordless sudo access be setup on either RHEL (Fedora, CentOS, etc) or Ubuntu distributions? (If it's the same across distros, that's even better!) Setting: personal and/or lab/training ...