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

learn more… | top users | synonyms

1
vote
0answers
32 views

Sudo Access for Active Directory Groups

I have my Linux machine connected to AD but I am unable to get sudo privileges. I can sign on using AD credentials, but sudo doesn't work. I have looked at everything I can find and everyone says to ...
-3
votes
1answer
39 views

can't switch to root or use sudo [closed]

I've just come into the following problem: For some reason I can't use su or sudo: usr@usr-MS-7816:~$ su Password: su: Authentication failure usr@usr-MS-7816:~$ sudo su [sudo] password for usr: ...
0
votes
0answers
26 views

sudo password being rejected, but system log-in work

adduser bob sudo usermod -a -G sudo bob I can log-in via terminal with the bob password but when i try any sudo command It asks for password but says it is incorrent. It is on ubuntu 12.04.
1
vote
1answer
20 views

Privileges when doing sudo to another domain user

Suppose I have a corporate domain mydomain using MS Active Directory. In the domain I have the users myuser and youruser. Now, on one specific Ubuntu machine mymachine, myuser has sudo rights, and ...
0
votes
0answers
8 views

Privileges when doing sudo to another domain user

Suppose I have a corporate domain mydomain using MS Active Directory. In the domain I have the users myuser and youruser. Now, on one specific Ubuntu machine mymachine, myuser has sudo rights, and ...
0
votes
0answers
19 views

mac osx ping6 only with sudo?

today I encountered a weird problem on Mac OSX 10.8.5 and IPv6: I tried to ping6 a host that is known to be up and running (I am connected to the host in question through ssh using the same remote ...
0
votes
1answer
16 views

how to put tabulator as parameter for sudo in sudoers file

I would like to give for specific user allowing to put tabulator as parameter to program. Full invoking looks like: sudo /sbin/vgs --units b --nosuffix --noheadings --separator 'TAB' I try to put ...
0
votes
1answer
33 views

sshfs mount using sudo'ed account

We have a linux system ferguson. On ferguson: I have user id a123. As user id a123, I am able to sudo su into userid admin. There is no direct login for the userid admin. We have to use our ...
0
votes
1answer
38 views

Amazon EC2 Centos instance needs sudo password after update

I've got a terrible problem on a running webserver. It's a webserver running on CentOS, one of the default Amazon EC2 AMI's (images). I've been able to ssh to the server and do my thing until now. ...
0
votes
1answer
49 views

sudo su not working correctly inside a bash script [duplicate]

I have a script to setup a machine that need to change to another user. Unfortunately, I get a "permission denied" after the su command. #!/bin/bash # script executed from /home/foo/ touch hi_foo cd ...
4
votes
3answers
528 views

SSH: su root or sudo? [duplicate]

What is the better option: Using su to switch to root or enabeling sudo? Without the use of sudo an intruder would need to know the password (or key) of a user allowed to ssh and then also the root ...
0
votes
1answer
16 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
161 views

Ansible shell command fails under sudo when it should succeed

I have an Ansible task based on https://github.com/al3x/sovereign/blob/master/roles/tarsnap/tasks/tarsnap.yml#L2 that keeps failing when it should succeed. I used to run the role with ...
-5
votes
2answers
44 views

Why isnt this sudoer command run as root? [closed]

I want to give PHP access to a very specific script using a configuration under /etc/sudoers.d. So I did the following: visudo -f /etc/sudoers.d/99-php And entered this sudo rule: www-data ALL = ...
0
votes
1answer
43 views

How to fix sudo file on EC2

I managed to save my sudoers file with a syntax error so now I can't do sudo -i any more on my EC2 instance. This effectively locks me out of root account since the only way to get root access on EC2 ...
1
vote
0answers
34 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 ...
7
votes
1answer
493 views

su: /bin/bash: Resource temporarily unavailable

Unable to switch user to postgres. Ulimit settings for postgres user is set with reasonable limits. We are not hitting max. No errors in /var/log/messages. Error: BETA -bash-4.2# sudo su - ...
0
votes
0answers
33 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
1answer
59 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
51 views

how to assign read only permission to sudo group

how can I assign read only permission to all users who are entitled in sudoer file? I want to assign the permissions on log files to those who are in sudoer file.
-1
votes
1answer
47 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 ...
-4
votes
6answers
116 views

Sudo immediately after login asks for password [closed]

If you think about it, it is kind of silly that sudo asks for your password even if you just logged into the machine and entered your password. I realize that sudo and /bin/login are two entirely ...
12
votes
4answers
1k views

Giving access of a set of commands to a non-root user without sudo

I want to give non-sudo access to a non-root user on my machine, there is a user dns-manager, his only role is to run all the BIND commands(rndc, dnssec-keygen) etc. Now everytime he has to run a ...
0
votes
1answer
119 views

Granting sudo access for specific command and any flags set (RedHat)

How can you grant sudo access for a specific command with flags. Ex. I requested sudo access for this command below: sudo /usr/bin/su - wassa /usr/was7/profiles/dmgr/bin/wsadmin.sh I can run the ...
2
votes
1answer
180 views

How to trigger sudo's grace period for a given user via Puppet?

I am trying to deploy the Redmine server via Puppet. The installation procedure uses Bundle to install its dependencies. When being installed interactively, sudo prompts user for password when Bundle ...
0
votes
1answer
59 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 ...
1
vote
0answers
219 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 ...
3
votes
1answer
815 views

Cron job as root need to sudo to another user [duplicate]

RHEL6 In root's crontab a have: * 21 * * * /root/script.sh In script.sh there is a line: /usr/bin/sudo -u jira bash -c 'cd /opt/jira/bin; ./stop-jira.sh' && echo "Jira Shut Down" >> ...
0
votes
0answers
89 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
1answer
169 views

sudo and --ask-sudo-pass on CentOS 6.6

I'm running command: [kamil@server.com ]# ansible example.com -a "sudo id" --ask-sudo-pass sudo password: example.com | FAILED >> { "failed": true, "msg": "[sudo] password for kamil: ...
0
votes
1answer
38 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
0answers
58 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
1answer
55 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 ...
3
votes
1answer
2k views

Running Ansible task as a specific user

I am trying to run a specific Ansible task as a different user than the one who is running the playbook. My .yml file looks like this: --- - hosts: staging_servers tasks: - name: check ...
0
votes
1answer
135 views

sudo: unable to execute … bad address - what is it and how to fix it?

I have a set of scripts which finishes up client machine deployment after executing a fairly generic NetRestore image. The main script runs under root privileges, and then calls another, "user" ...
0
votes
1answer
99 views

Can I use serverspec on a remote system without requiring root or sudo access on that system? [closed]

Main thing I am trying to do is to run the tests from an unprivileged user (a gui runs these tests) without giving away the keys to the castle if this user gets compromised. Most of the tests ...
1
vote
1answer
277 views

Ansible SSH as one user and Sudo as another

I am having trouble with configuring Ansible and sudo to allow me to SSH into a server and run a command as another user. I have gone through the questions / answers below and the Ansible ...
1
vote
1answer
38 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
75 views

Slow sudo and ssmtp (hosts file wrong?)

I'm running an Ubuntu Server 12.04.5 LTS and when I type sudo su it takes 30+ seconds to open the shell. Searching on internet, this problem seems related to the file /etc/hosts and /etc/hostname. ...
3
votes
2answers
1k views

Ansible Fails to Authenticate Sudo Even When Sudo Pass is Given

Problem Using the latest, stable Ansible build, I have an odd problem where my playbook hangs on one server during "Gathering_Facts" but works fine on other similar servers when using Sudo. On the ...
0
votes
1answer
201 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 ...
2
votes
0answers
91 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 ...
0
votes
2answers
142 views

Linux: How to allow a regular user to “su - anotherUser”?

I wrote a Nagios check script which checks if user peeradmin is able to touch a file in some mount on the server. Nagios user is: nagios . I've edited /etc/sudoers and added these lines but none ...
3
votes
1answer
144 views

SE Linux - can't change SELinux booleans with sudo

I think this is the correct place to put this, rather than in StackOverflow Either way, we have a CentOS 6.6 server. SElinux isn't allowing us to enable httpd_can_sendmail I've tried this.... sudo ...
0
votes
1answer
90 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 ...
-1
votes
1answer
69 views

How to deny a specific user to reboot or shut down with sudo [duplicate]

Hello and thanks for helping me in this question. I just have in /ets/sudoers something like this: # User Aliases User_Alias CLIENT = jhonny CLIENT myserver = ALL. !ADMIN_CMD,!SU I just want deny ...
0
votes
1answer
82 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
176 views

ubuntu sudoers file hacked?

I've 3 ubuntu 14.04 vm on a remote hosting for code repository and testing purpose. I've got them for more than 1 year now. Two of them are working properly, but on one of them I can't run root ...
1
vote
0answers
163 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 ...
0
votes
2answers
171 views

Execute bash script as root from normal user

I am trying to execute a bash script as root from a normal user. The story behind is that I need the www-data user to be able to kill a specific process. To avoid having apache being able to go mayhem ...