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

learn more… | top users | synonyms

2
votes
2answers
48 views

Linux: Allow user to execute specific command on behalf of any other user

I am trying to find a way to allow user john to execute a command (say echo) on behalf of another user peter without being prompted for password. I found a thread that I thought would be the answer ...
1
vote
2answers
19 views

Prevent root in linux from changing folder permissions in GPFS filessystem

I have created a NFS export in a GPFS/SpectrumScale filesystem I created. I have enabled AD based authentication with our domain. Everything works. The NFS export was created with NFS4. The NFS ...
1
vote
1answer
14 views

Unable to mount NFS export unless I sudo to root

I created an NFS export on a GPFS/SpectrumScale filesystem I set up. I tested the NFS export on a xLinux, pLinux, z/OS and AIX succesfully. I then enabled AD based authentication on the NFS export ...
0
votes
0answers
8 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], { ...
1
vote
0answers
19 views

How to run root commands form a website? [closed]

Im working on a project, in it I intend to make a website with server administartion functionalities. So far, I'm able to run all guest commands like ping,nmap,etc. But, I want to run root commands as ...
2
votes
1answer
30 views

Create a Web User

I am running Apache 2.4.8 on Arch Linux, but that doesn't matter really. I would like to create a user who is devoted to web management. I have created a user, a group, and added the user to the ...
-2
votes
1answer
24 views

Is it possible to “sudo su” using ssh in bash? [duplicate]

#!/bin/bash USERNAME=ksmith HOSTS="linux1" YUPDATE="sudo yum -y update" FIXDATE="sudo -u echo -e 'ZONE="America/New_York"\nUTC=true' > /etc/sysconfig/clock" for HOSTNAME in ${HOSTS} ; do ssh -tt ...
0
votes
0answers
41 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
1answer
44 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
68 views

sudo mv fails with “Operation not permitted”

When I command on my MacOS: > sudo mv /usr/bin/php /usr/bin/php-52 I get the result: mv: rename /usr/bin/php to /usr/bin/php-52: Operation not permitted What can I do? Thanks!
5
votes
1answer
82 views

Limit number of concurrent users switching to root account?

This is for Ubuntu 14.04 and Centos 7. I need to limit the number of users actively running as root. i.e. Logged in as root on the CLI. Basically, I want only one user at a time to be able to run ...
0
votes
0answers
17 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: ...
-3
votes
3answers
58 views

I want a user to run bash scripts with sudo [closed]

So this is for a school assignment. I have a working Bind9 and Apache2 server. I've written 3 scripts that make appropriate changes to the configuration files DNS add zone DNS add record HTTP add ...
1
vote
0answers
33 views

Using Ubuntu Server 14.04 as a webdeveloper [closed]

I have a Ubuntu Server 14.04 installed in my network used solely for development of websites (PHP, Laravel). Websites are located in their own directories under /var/www/domain.ext and can be accessed ...
0
votes
1answer
133 views

Ansible become_user not picking up path correctly

Here's the code showing what I believe is a problem: # Debugging path problems with sudo --- - hosts: webservers remote_user: root tasks: - name: echo path command: echo $PATH register: ...
1
vote
3answers
59 views

Run bash script as sudo from windows without interaction

I need to execute a bash script as sudo on a remote linux machine from TeamCity running on a windows box. I can execute the script fine from the cmd line using plink, but I am prompted for a ...
3
votes
0answers
214 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 ...
0
votes
0answers
9 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 ...
23
votes
2answers
2k views

Why does password entering work in a piped sudo command?

If I do: sudo cat /etc/resolv.conf | less It will prompt me for the password, even though less (presumably) takes stdin. Over what fd's is the password prompt shown and how does it get the input ...
-1
votes
2answers
31 views

debugging sudo -i -u www-data -g www-data env

When I run sudo -i -u www-data -g www-data env I get sudo: unable to change directory to /var/www: No such file or directory This must be coming from script somewhere, but I don't know where. How ...
1
vote
1answer
50 views

Executing php as sudo inside crontab [duplicate]

I've wrote a PHP-Script, and the execution requires sudo permission, because it executes some other system related stuff. So i've added this into the crontab -e but i can't see, that my script is ...
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
46 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
votes
0answers
12 views

Give Non Root group of Users access to start mysqld service [duplicate]

I have a Non Root User abc,abc2..... I want to add this to a group of users and want to give the group of user ssudo rights only to restart, start or stop - mysqld service. i.e sudo service mysqld ...
1
vote
2answers
84 views

Give Non Root user access to start mysqld service

I have a Non Root User abc and want to give the user sudo rights only to restart, start or stop - mysqld service. i.e sudo service mysqld restart. How can I do it so? I would like to do the same ...
2
votes
2answers
86 views

Setting password on sudo su for Amazon EC2 Instance

Our staging server is on an Amazon EC2 instnace. When you ssh into it you can execute a sudo command or sudo su without having to enter a password. Is there anyway I can require a password from a ...
0
votes
1answer
146 views

Why does my Upstart job work with sudo but not with setuid?

I have an Upstart job for a Node.js application, and I want to make it run Node as the node user rather than root. When I use setuid in the job config, whenever I try to start the job, it says my-app ...
0
votes
1answer
39 views

sudo rules based on host with interactive ssh session

I'm trying to configure sudo in such a way that I don't have to enter my password when I connect from a specific IP range. I tried to this with the following line in my /etc/sudoers file: %wheel ...
0
votes
1answer
41 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
83 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
37 views

saving iptables rules without logging in to root

I am trying to save iptables rules file to /etc/sysconfig/iptables. I want to do this without logging in to root. I tried to using sudo iptables-save > /etc/sysconfig/iptables but it throws ...
0
votes
0answers
104 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 ...
2
votes
1answer
56 views

How to check root environment variable from sudo user?

How I may check root environment variables from sudo user? I tried various keys and combinations of su and sudo, but have no luck. For example, $HISTFILESIZE=2000 for ordinary user and 9999 for root ...
0
votes
0answers
6 views

NOEXEC Tag Unexpectedly Being Applied in Sudoers [duplicate]

I used the NOEXEC tag to add the ability for users to launch debugging tools as root, without also having the ability to launch arbitrary commands. This part is working as expected. However, the ...
0
votes
0answers
39 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
146 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: ...
4
votes
3answers
393 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. I use RedHat 5 64-bit Enterprise Edition. I am logged into the box using SSH. I can restart using the ...
3
votes
3answers
104 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
15 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
62 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
62 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
42 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
1answer
202 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
198 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
32 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.
2
votes
1answer
50 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
40 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
21 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 ...