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

learn more… | top users | synonyms

2
votes
1answer
80 views

Ansible-galaxy not working with sudo

I'm having problems instaling plugins with ansible-galaxy. I've tried 3 things: Instaling without sudo: ansible-galaxy install sfromm.epel [WARNING]: - sfromm.epel was NOT installed successfully: ...
2
votes
1answer
74 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 ...
2
votes
1answer
321 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 database:...
1
vote
1answer
39 views

Confusing e-mail related to sudo

My system occasionally sends me this email. (My domain has been replaced with [DOMAIN] and my username has been replaced with [USERNAME].) Subject: *** SECURITY information for [DOMAIN] *** [DOMAIN]...
1
vote
1answer
135 views

Sensu executing script sudo a password is required

I have a sensu handler that gets triggered on an endpoint Linux box (Centos 6.6. Here is the script I'm using: #!/bin/bash --login sudo -n -u deploy bash --login -c "cd /var/www/vhosts/sc/current; ...
1
vote
1answer
24 views

Centos 6 - Allow sudo composer self-update for user without password

I'm trying to allow my wheel group user to run sudo composer self-update without a prompt for a password for my deploy script. I have added the bottom line below to my /etc/sudoers file: ## Allows ...
1
vote
1answer
169 views

Difference between sudo /bin/bash and sudo su to access root

I am aware that there are at least 2 ways to escalate to root privileges when in the terminal, and am genuinely curious as to whether there is a differences / are differences as to what can be ...
1
vote
1answer
49 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
550 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
2k 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
24 views

How can I ensure auditability and least privilege based on AWS users inside an EC2 image?

I'm interning at a company which runs in an AWS environment and is starting to look into locking down user privileges, so I'm looking into ways to secure EC2 instances. Specifically, I want to find a ...
0
votes
1answer
45 views

How to register user on ejabberd using php code?

I am trying to register user on ejabberd linux server. I am using below php code <?php $username = 'hello'; $password = 'hello'; $node = 'my ip'; exec('sudo -S ejabberd /usr/sbin/...
0
votes
1answer
272 views

sudo and Kerberos on AWS Linux issues

We have an issue on some of our AWS machines, running Amazon's hacked Fedora/RHEL linux where newer-in-AD users can login with password but cannot autheticate for sudo. Users that were created in AD ...
0
votes
1answer
43 views

security issues when executing ssh as root?

i was asking myself, if it is unsafe for some reason, to connect to an ssh-server when you are root on the computer that represents the ssh-client. i was googling, but i only found tons of questions ...
0
votes
1answer
155 views

Saving the Iptables rules to the iptables file

I am trying to save the iptables current rules to iptables file through my java application. Since i do not have the permission to write to the file without logging in to the root, am using this ...
0
votes
1answer
61 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: ...
0
votes
1answer
46 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
128 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
111 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 /usr/local/etc/sudo/...
0
votes
1answer
114 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 ...
0
votes
1answer
100 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 ...
3
votes
0answers
931 views

Running service with systemd as default user via ansible in ec2 (requests password)

I'm trying to employ the following Ansible script (part of a playbook) to run unicorn via systemd for a rails app on EC2 (micro) instance: --- - name: restart unicorn command: psql -h {{ db_host }}...
3
votes
0answers
147 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
35 views

ssh -t -t sudo displays back my password

My problem is about executing sudo over SSH. I have tried various things, but non works. Here is my script: ssh my-host /bin/bash << EOF # some commands... sudo -u my-user -s -- << EOFF ...
2
votes
0answers
225 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
857 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
17 views

File in sudoers.d/ directory became corrupt, cannot delete it? pkexec not working (Azure VM)

So I've got an Azure VM where I wanted to copy a file into an /etc/sudoers.d/ folder. Obviously I've tested the file before copying it, however something weird must have happened when transferring it ...
1
vote
0answers
13 views

sudo as another user that contains current user string in username

Let's say there are 100 users in the system: msmith bdole agrant . . . Is there a way to write a generic sudoers rule to allow each of these users to execute commands as another user, where the ...
1
vote
0answers
18 views

restoring debian user access

I have accidentally set the owner for all files and folders in the /home folder to 'root' (and a lot of other folders also) and now when I ssh into the server as myusername, I get the following error: ...
1
vote
0answers
63 views

audisp-remote signal USR1 works as root, not with sudo

So I have a weird problem that I'm running out of ideas to troubleshoot. My RedHat machines are using audisp-remote to send syslog messages to a central server. audisp-remote will respond to the ...
1
vote
0answers
39 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
499 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
213 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
277 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
116 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
181 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
85 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
16 views

Ubuntu 16.04 Node/ NVM - cannot sudo gulp (where is the .profile for sudo)?

I have installed NVM on an ubuntu server so that it is easy to change node versions. The install is working fine, and I insert nvm use 5.12.0 in the users .profile so the default nvm is in play. I ...
0
votes
0answers
17 views

Can I manage sudoers from Open Directory?

I have configured Open Directory & integrated it with Microsoft Active Directory so that the users sync with Open Directory. Now I want to manage sudo commands from Open Directory. Is this ...
0
votes
0answers
18 views

Composer works as Common User but not root

When I run 'composer' as a common user, composer runs just fine. However if I run 'sudo composer' I receive a command not found message. When I enter 'sudo /usr/local/bin/composer' it works just fine. ...
0
votes
0answers
69 views

remote execution of commands using sudo /usr/bin/ssh

I have the following sudoers file in /etc/sudoers.d: Cmnd_Alias GETCONFIGFILES = /usr/bin/ssh servername.mydomain.com -p 1022 'cat /path/textfile.txt' User_Alias TOMCATUSER1 = localuser TOMCATUSER1 ...
0
votes
0answers
20 views

Run a script if another process was spotted

I have CentOS 7 and looking for a sollution about a small issue. I want to have a sudo script to be run but only if the system executed a specific command remotely. For example: I've put my command ...
0
votes
0answers
73 views

How to autostart node forever and spawn() as sudo?

My app periodically spawns a CasperJS scraper: spawn(CASPER_PATH, [SCRIPTS_PATH + fileName, '--ssl-protocol=any', '--user='+user, '--scrapeId='+scrapeId, '--pass='+pass], { detached:...
0
votes
0answers
150 views

sudo NFS SUID not working

Today I decided to move my NFS files from an ext4 HDD to an ext2 HDD using mc. Since then I am having trouble running the sudo command on all clients. When I try to run it I get an error saying "...
0
votes
0answers
69 views

cann't we have 32 bit uuid package installed along with 64 bit uuid package in ubuntu 12.04 64 bit

i am using 64 bit Ubuntu 12.04. i am trying to build 32 bit project in 64 bit Ubuntu OS. UUID generator related functions in a library. it is giving below linker error related to luuid: /usr/bin/...
0
votes
0answers
15 views

Appropriate user permissions for reading private dkim file contents from web app

As it stands, when sending email using clients like Thunderbird, my messages get signed with DKIM. However when generating emails from a web application, they do not get signed. As it stands I've ...
0
votes
0answers
134 views

sudoers file not working

I cannot for the life of me figure out why the sudoers file is not working. Anytime a user tries to login and elevate, they are give the error <name> is not in the sudoers file. This incident ...
0
votes
0answers
43 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
0answers
191 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
92 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 ...