sudo is a tool which allows users to run commands as another user (usually the root user)

learn more… | top users | synonyms

5
votes
2answers
466 views

Is there a way to allow command in sudo based on the current working directory?

I want sudo to allow me to run a command when my current working directory is, for example, /tmp. Example usage is removing files from /tmp directory, so I am in /tmp ($PWD of shell == /tmp), then I ...
2
votes
2answers
81 views

Root user is not able to access

I had a ubuntu user which has root level privileges but I haven't created password for it, there are other user also on the machine but none of them have sudo permissions, unfortunately permissions on ...
1
vote
2answers
110 views

Recover sudo password of server over ssh

I am working on an ubuntu 12.04 server and i was not provided a sudo password. Now i need to recover it. I found out that we need to reboot into recovery mode to do so but we don't know how to get ...
3
votes
1answer
328 views

Sudo resetting environment variables

Whenever I use the sudo command, none of my environment variables appear to be preserved. I've tried modifying the sudoers file, by removing the env_reset specification. #Defaults env_reset I've ...
2
votes
1answer
246 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 ...
1
vote
1answer
34 views

Starting lighttpd from nagios renders lighttpd broken

I'm using Debian 7.8 (wheezy), and lighttpd 1.4.31 with nagios 3.4.1. when I start lighttpd normally (as root), everything works as expected: /etc/init.d/lighttpd start However, when nagios starts ...
1
vote
1answer
137 views

mkdir is not working with sudo and shell option

One of the application trying to create directory failing with the below error on Linux machine: $ /usr/bin/sudo -su oracle /bin/sh -c '/bin/mkdir -p /u01/app/oracle/test12' /bin/mkdir: missing ...
1
vote
1answer
1k 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
7 views

BNF diagram for sudo file

How can I generate a (BNF) railroad diagram for /etc/sudoers file? I know the sudoers manpage has Extended Backus-Naur Form informations. Also, there are some tools to generate such diagrams (see ...
0
votes
1answer
38 views

What is causing visudo to fail with: “visudo: can't stat <filename>: Bad file number”?

We use the #include feature in the sudoers file for organizing our sudo rules on a per-application basis. Our sudoers set up looks kinda like this: /etc/sudoers -> #include ...
0
votes
1answer
47 views

How do I create files in directory owned by user in same group without sudo?

I have created a user to own website files (drupal) and added that user to www-data, so essentially all files are drupaluser:www-data. I want to go in and put the site in to git but I get permission ...
0
votes
1answer
26 views

FreeTDS - sudo uses different protocol version

After a while of fiddling with FreeTDS I got my connection to MSSQL from Sphinx up and running as DSN-less connection. After running indexer index Everything works as expected. But, after ...
0
votes
1answer
44 views

Can't change folder ownership via SSH

For some reason, I have a folder that I cannot read nor change its ownership. If I do a ls command, this is what I get: drwxrwxrwx 4 myusername myusername 4096 Jan 26 20:35 media1 <--- OK ...
0
votes
1answer
135 views

sudo : wildcard in user/group name

I try to find a solution about a sudo problem. I need to push different sudoers files on different servers, depending on the users present on the servers. But I would like to know if I can avoid that ...
0
votes
1answer
75 views

Sudo-io log output shows garbled text

We have set up in our servers sudoers config the following configuration in order to log the console output for auditoring purposes Defaults:%administrators log_output Defaults logfile=/var/log/sudo ...
0
votes
1answer
77 views

Monitor root commands issued by users

I tried to log the commands issued by the system administrators in our organization and its output using sudo plus the log_output directive as follows on the visudo file Defaults env_reset ...
0
votes
1answer
442 views

Centos : su: incorrect password after bash update

A few days ago I've updated the bash to patch it agains Shellshock and since then I cannot su - root from my regular 'wheelgroupuser' account on Centos 6.5 with WHM. I'm constantly getting su: ...
0
votes
1answer
283 views

yum search fails when run as non-root user

My yum has started failing to do search as a non-root user. This was working previously, and then something has been gummed up: sudo yum update works fine, as does sudo yum search blah. yum search ...
0
votes
1answer
44 views

Upgrading sudo rights

One my server, I've given the main user for the web server, access to /usr/bin and /tmp. I did this so that ceartain scripts could could call exim without this user needing to have full sudo rights. ...
0
votes
1answer
193 views

Allocate pseudo TTY in Upstart configuration file

We would like to use Upstart to manage a Java process and run it as non-root using sudo. We are on RHEL 6 which means that Upstart is too old to allow us to explicitly specify a user hence the use of ...
0
votes
1answer
140 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
1answer
176 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 ...
0
votes
1answer
381 views

Cant remove linux ln hard links

I am using CentOS 6.3 and am logged in a root. When I create a hard link by doing this: ln /root.hdd /somedir/root.hdd That works fine, the inode shows the same between the two files and ...
0
votes
1answer
79 views

Allow User Account to run a single command using SUDO privelages

I have a machine running Ubuntu 12.10. I have two user accounts setup, my account, and another user. I am able to run SUDO commands, but the other user isn't in the SUDO'ers list. What I'm trying to ...
0
votes
1answer
632 views

Troubles monitoring a zimbra installation with nagios

I am trying to monitor my legacy zimbra installation (running on an outdated Ubuntu 8.x) from my nagios install (running on a more recent OpenBSD). The problem is that when I run check_nrpe from the ...
0
votes
1answer
200 views

Getting permission denied error

On my Media Temple DV 4.0 server I am getting permission denied errors: -bash: cd: httpdocs: Permission denied If I switch from my login user to sudo (sudo su) or switch to root using su-, I can ...
0
votes
1answer
190 views

File permission woes on an Ubuntu ec2 instance

I've set up an amazon ec2 instance and I'm have some file permission issues. I've created myself a new user and added myself to the following groups: adm:x:4:me,ubuntu sudo:x:27:me ...
0
votes
1answer
411 views

Unable to change user password on AWS using `passwd` command

I am using Amazon's AWS insances running CentOS. I was trying to create a user with SUDO privilege and then disable the Root login to secure the systems. I have already done the required to bring this ...
0
votes
1answer
608 views

How to run smbpasswd as root on AIX?

I have Hitachi ID Password Manager (formerly p-synch) set up to change the password on (among other systems) an aix 6.1 server running samba. p-synch has the capability of executing additional ...
-1
votes
1answer
34 views

amazon ec2 linux redhat server install unar package

I'm just trying to install unar package for the purpose of uncompress compressed files. What I've tried is sudo yum install unar But it shows "No package unar available". I googled and downloaded ...
-1
votes
1answer
1k 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 ...
-1
votes
1answer
248 views

sudo logs date with user's locale, apparently. How do I make it use “C” locale?

I have sudo set to log to /var/log/sudo.log. I've noticed that when the locale was set to "de_DE.UTF-8", it logged a localized date ("Mär" for "März") instead of "C" locale ("Mar" for "March"). How ...
3
votes
0answers
354 views

Kerberos, .k5login and sudo

Background: I am using a Debian 7 system which I have integrated with an LDAP+Kerberos system using libnss-ldap, libpam-krb5 and nscd. I have modified sudoers to permit an LDAP group the right to sudo ...
2
votes
0answers
74 views

For sudo su - to retain SUDO_* environment variables?

We have a number of script (for Openstack operations) which require privileged execution in our environment. For some of the scripts we'd like to refer back to the USERNAME or UID of the person who ...
2
votes
0answers
83 views

Slow authentication on Fedora VM due to /var/run/dbus/system_bus_socket connect timeout

I have this Fedora VM that for some reason after a while always starts having very slow "sudo" authentication (or an authentication in general, like GUI apps asking for credentials). It's will work ...
2
votes
0answers
735 views

Nginx doesn't seem to stop correctly

I'm using the following script to start/stop nginx: #! /bin/sh ### BEGIN INIT INFO # Provides: nginx # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # ...
1
vote
0answers
29 views

NFS local user mapping works, but not with sudo

I want to use an NFS share for backing up. I have created a local user on the client with a specific uid/gid combination that works for writing files to the NFS share. So far so good. However, I need ...
1
vote
0answers
159 views

Sudo error: effective uid is not 0, is sudo installed setuid root? (sudo executable is already root/root 4755)

Running /usr/bin/env sudo /etc/init.d/httpd restart on a godaddy vps works fine from the shell. The same command executed remotely via capistrano generates the following error: sudo: effective uid is ...
1
vote
0answers
150 views

What is a safe alternative to wildcards in /etc/sudoers?

In the /etc/sudoers file on my Red Hat server, I have this line: %webdevgroup ALL=NOPASSWD: /bin/chmod * /home/http/* This is clearly a bad idea, since someone could do something like this: sudo ...
1
vote
0answers
127 views

RHEL Equivalent of AIX's chuser login=false rlogin=false

On AIX, I can disable login/remote login by setting the attributes listed to false, but I will still be able to su from other users, and sudo as the user. Is there an equivilant in RHEL to the ...
1
vote
0answers
84 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
0answers
152 views

Intermittent sudo failure - SuSE 10

We have a longstanding production issue where cron on certain servers periodically report the following error- sudo: uid NNN does not exist in the passwd file! The user does exist, in fact it is ...
1
vote
0answers
70 views

Change sudo defaults only for sudo -i

At my site the typical sudoers setup has Defaults mail_always globally set so we can keep track of what the users are generally using sudo for (which should be very infrequent) and sort out fixing the ...
0
votes
0answers
18 views

Pulling Read restricted files from a remote system with rsync and sudo

A remote system generates statistics files every 5 minutes and places them in a certain directory. At any given time there are 1000+ files in that directory. Every 5 minutes I want to copy the ...
0
votes
0answers
63 views

Slow sudo response

We have LDAP setup to provide information regarding sudo. The whole system works, but it takes a long time (~10 seconds) for any sudo command to return. For instance if I run strace -f -r -o ...
0
votes
0answers
45 views

Using placeholders or environment variables in sudoers

Is it possible to use in sudoers rules any kind of placeholders (not just wildcards) or environment variables? What I would like to do is to verify that user (the one sudoing a command) passes as an ...
0
votes
0answers
111 views

sudo and ulimit - behaviour change?

I've noticed a behaviour change between sudo in Ubuntu Saucy 13.10, which has sudo 1.8.6p3, and Ubuntu Trusty 14.04.1 LTS, which has sudo 1.8.9p5, but I don't understand precisely what it is, or what ...
0
votes
0answers
127 views

Edit a remote file in Vim with sudo when ssh root login is disabled

I am trying to determine a way to edit remote files in Vim that require sudo, but still use my local vim config and plugins. Currently I can open vim and :e scp://me@server//some/root/file and make ...
0
votes
0answers
48 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 ...
0
votes
0answers
165 views

sudoers works with hostname but not with the full domain name (fqdn)

I'm using puppet to propagate a sudoers file to several environments with different domains like so: Host_Alias STG1 = *.stg1.wa.acme.com Host_Alias STG2 = *.stg2.wa.acme.com This works ...