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

learn more… | top users | synonyms

0
votes
0answers
24 views

Sudoers, allow user to use root alias

Actually, my root have to aliases: alias unpool='/path/to/my/scripts/unpool.sh' alias pool='/path/to/my/scripts/pool.sh' I have the same for my user in ~/.bashrc I defined my /etc/sudoers.d/user ...
0
votes
1answer
36 views

Ansible, Vagrant, sudo and ssh-agent

So I've seen this question and added the Defaults env_keep+=SSH_AUTH_SOCK into my /etc/sudoers file but I am still unable to clone from github on my Vagrant box using sudo: true and sudo_user: ...
3
votes
3answers
260 views

How to SSH after remotely restarting Redhat and enter recovery mode

I need to enter recovery mode of my redhat box which is running remotely on a virtual machine. OS: RedHat 5 64-bit Enterprise Edition I am logged into the box using SSH. I can restart using the ...
2
votes
3answers
47 views

Grep access on maillog for non root

I would like to grant a specific (regular) user grep access on my maillogs (/var/log/maillog*). I'm not prepared to change the log permissions, as they should remain root-only, so I think the ...
-1
votes
1answer
11 views

Why syntax error with visudo ¿?

What's wrong with this line of sudoers file? %test ALL=(ALL)NOPASSWD:/usr/bin/supervisorctl status test, /usr/bin/supervisorctl start test, /usr/bin/supervisorctl stop test, /usr/bin/supervisorctl ...
0
votes
2answers
41 views

Limit user to access only 'docker inspect'?

Is there a way to give access for a user (www-data to be exact) to access ONLY 'docker inspect'? Any working solution is acceptable
0
votes
1answer
29 views

sudo (-E) doesn't preserve path, even when configured appropriately

I have circus installed in a python virtualenv using virtualenvwrapper, and I want to run it with sudo. Sounds simple, right? Unfortunately even after reading man sudo and man sudoers, I don't ...
0
votes
1answer
21 views

Allow login as any user from group by sudoers

I'd like to add to /etc/sudoers rule to allow login any user from group admin as user from group users. Example: In group admin I have: alan and smith. In group users: anna, mike. And other users: ...
1
vote
0answers
14 views

Is it safe to create symlink under /var/www/ which points to my home directory? [duplicate]

I am using local Ubuntu server with Apache 2.4. I am running as a default user Ubuntu and each time I need to change something under /var/www/ I have to use sudo to avoid permission denied messages. ...
1
vote
0answers
54 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
64 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
23 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
10 views

Privileges when doing sudo to another domain user [duplicate]

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
23 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
35 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
57 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
69 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
578 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
20 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
300 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
48 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
47 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
675 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
1answer
48 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
64 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
75 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
54 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
125 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 ...
13
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
164 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
189 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
66 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
255 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
1k 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
104 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
180 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
44 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
68 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
64 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
162 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
120 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
317 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
41 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
79 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
2k 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
226 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 ...