The sudo command is a program for some Unix and Unix-Like operating systems, that allows a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user.

learn more… | top users | synonyms

1
vote
0answers
10 views

How can I redirect OS X dtruss output when running with sudo?

I'm running dtruss on Mac OS X 10.9. Simple example is: sudo -c ls But I'd like to capture the dtruss output into a file. I saw something that suggests that I can do something like: sudo bash -c ...
0
votes
0answers
93 views

sude gedit Gtk-WARNING **: cannot open display:

I have a VPS on which I am attempting to install pure-FTPd via a root SSH account on a remote machine. I have already installed gedit and have gotten to the stage where I need to edit a config using ...
0
votes
0answers
13 views

sudoers: allow users to remove from their home directory

I'd like to add a sudoers rule that says users are allowed to remove files from their home directory , but I don't see any way to limit arguments to be a subdirectory of the users' home. Is there any ...
0
votes
1answer
25 views

Why does a double sudo modify permissions?

Context: sshed into an AWS t1.micro instance running Amazon Linux 2013.09, using the default ec2-user. I'm trying to list the contents of the default postgresql directory: What's in there? $ ls ...
21
votes
5answers
2k views

Sudo vs root; any actual differences?

I'm working with a support member for a product, and he insists that I need to be root to install a series of patches, and that sudo won't work; he doesn't provide a reason but seems very firm in his ...
0
votes
1answer
33 views

Permission denied on sudo remove

I have two users userA and userB. userA has permission over a file named cache. I want to give permission to userB to remove the file. I have made following entry in /etc/sudoers file : userB ...
1
vote
3answers
26 views

Add a sudoer non-interactively from command line

(On Centos through Docker) I know that I can add a sudoer using visudo. Is there a way to add a user to the sudoer list straight from the command line, so I don't have to do it interactively? I'm ...
1
vote
2answers
27 views

Security risks using SUDO in TERMINAL on MAC

I'm very new to using Terminal and anything like that and stupidly followed an article that uses Terminal with the SUDO command. The sudo command basically loaded a file which updated my ...
2
votes
2answers
97 views

Issue with environment variable

Please help me running below command from user2 account. I cannot figure out what's the issue with this. [user2@localhost bin]# sudo -u user1 /opt/Tomcat/bin/shutdown.sh Neither the JAVA_HOME nor the ...
0
votes
0answers
46 views

Can't sudo when logged in with ssh

I set up a ubuntu machine on my local server. I've got a user with sudo privileges (same password as for login). I've got passwordless ssh going by putting my rsa public key on the ubuntu machine. So ...
0
votes
1answer
23 views

Run startup script with another user

I have two users user1 and user2. And tomcat has owenership of user1 and started with user1 only. I need to make a rule for user2 such that user2 can starts/stop tomcat but tomcat should always be ...
1
vote
1answer
30 views

Understanding implications of sudo -u -H

I'm trying to install gitlab from this guide on Ubuntu 14.04 Server. It is also worth mentioning that I'm behind a http proxy. I'm having problems with this line in particular: sudo -u git -H git ...
1
vote
2answers
23 views

Limit user to execute selective commands (Linux)

How can I limit my user to execute selective commands only. I have a user tomc in tomc group. I need this user to be sudo user and then to have restricted bash. I have tried following code in ...
-1
votes
0answers
34 views

Can't delete folder, permission fault

I have a white Mac Book and I am trying to install keyremap4mac, but it tells me that I have installed "double command". I deleted double command but in my library/startupitems/ there is a folder ...
0
votes
0answers
12 views

sudo ENV_KEEP not always preserving

When I run sudo -s, my environment is preserved. However, when running a simple sudo <command> it appears not to be preserved. The contents of my sudoers file: mafro@ip-10-xx-xx-250:~ > ...
0
votes
1answer
27 views

Sudo as www-data, unable to cd

I have a .procmailrc setup which pipes emails into a script. The core of my problem is that the email is received as user 'magic', and the script that I need to process the email needs to be run as ...
0
votes
0answers
126 views

SU : Permission denied /bin/sh

I added a new user in system: $ useradd new_user When I try to switch from root to new_user, I get this error: $ su new_user permission denied /bin/sh $grep new_user /etc/passwd ...
2
votes
3answers
174 views

What exactly do the sudo -s command? and how is it used in this example?

I have the following doubt. In a tutorial related to a software installation that I am following say that I have to execute the following commands (I am doing it into an ssh shell, so this list of ...
0
votes
0answers
98 views

Python2.7 / Pip2.7 install in Centos6: root does not see /usr/local/bin

I am trying to install Python2.7 in Centos 6. It's a pain as centos6 ships with python26 and yum is dependent on it. Furthermore yum does not seem to have python2.7 I ended up building it from ...
1
vote
1answer
380 views

Running docker as sudo

I installed boot2docker and the i run ./boot2docker start export DOCKER_HOST=tcp://localhost:4243 so i started the tutorial from their docker site. I don't understand one thing: when i run ...
0
votes
2answers
56 views

Setting node path and allowing to run as sudo

I've got a raspberry pi that I'm running node on. I followed this guide http://joshondesign.com/2013/10/23/noderpi to install node. When I setup the NODE_JS_HOME, I can run node from the command ...
0
votes
1answer
44 views

How can I install my script into the user's $HOME/.bin (or $HOME/bin) directory and make sure that is in their PATH?

Edit: places where I said $HOME/.bin I should have written $HOME/bin or any equivalent is fine. So I have a bash script which I am distributing as a client for my API. Current version installs like ...
0
votes
0answers
45 views

User has Sudo access locally but not remotely

I've got a Ubuntu desktop installed as a vm on Windows 2012 server. I've installed Likewise Active Directory to allow domain users to log into the machine with Windows credentials. In my sudoers file, ...
1
vote
1answer
65 views

How to do admin tasks without becoming root on Debian?

How can one perform some administrative tasks from non-root account without becoming root on Debian 7? For example, my iptables block all network access for all users including root except one user - ...
0
votes
0answers
21 views

Sudo Cmnd_Alias Optional Arguments

I would like to allow a command to be run under sudo with or without arguements. For example, both of these should work: rm -f /etc/stuff rm /etc/stuff/item.txt To get this to work, I need this ...
1
vote
1answer
65 views

Adding sudoer for all but root

Here is the base of my problem: I would like to add sudo rights to a user, but not to use it as root for security reasons. I have a PHP script needing to run a command (drush) through exec(). ...
0
votes
1answer
73 views

Get around permission errors

In Ubuntu, whever I run into a permissions error I just run the command as sudo at it usually works. Not the case in OSX: $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" ...
3
votes
1answer
147 views

'user is not in the sudoers file' but actually is

I have already read a lot of posts about enabling sudo-access for a specific user but those couldn't help me so far. The situation is: I'm running Debian Testing. On the system there are only two ...
2
votes
3answers
224 views

How do you set alias sudo='nocorrect sudo ' correctly?

Until Recently I had alias sudo='sudo ' in my .zshrc file. Today I ran into this error on trying to do sudo mv: ➜ ~ sudo mv nginx.conf.orig nginx.conf.orig2 sudo: nocorrect: command not found Now ...
-1
votes
1answer
39 views

Correct way to override file permission /dev/null

I am in a middle of this problem, and not sure which method to follow ? I am using a plugin which writes temporary files (*.txt / *.tmp etc.) to /dev/null. The plugin is complicated and changing the ...
0
votes
0answers
29 views

Inconsistent behavior from sudo ls -l and grep command running on AIX 6.1 TL9 SP1 after upgrade from AIX 6.1 TL8 SP3

Here is an example with grep [(qtjbc)l17asp03:/db2/DEV/scripts/updatekrnl]>sudo grep lt start_sap.ksh corp AD Password: if [[ $# -lt 2 ]] then while [[ ${IND} -lt ${NUMOFMOUNTS} ]] ...
1
vote
1answer
55 views

sudo command with equal sign (=) gets confused for environment variable

I'm trying to run various commands through sudo, where the equal sign (=) is a part of the command. Under certain cases, it seems that sudo confuses that sign for setting and environment variable. I ...
0
votes
0answers
42 views

Pip SSL certificates fail with sudo but not in su

When I pip install, I can download the package, but I have a failure in writing to files that are only accessible with privileged access. This is expected behavior. When I sudo pip install, I have an ...
2
votes
0answers
42 views

Sudo works as su

Ive observed kind of strange behaviour. I have openSuse and when Im in console and want to gain root access for executing one command, after typing sudo it like switches me as if Id type su. ...
1
vote
3answers
357 views

How to execute commands as root in git post-receive hook

I just recently set up a remote git repo on a server for a web app running as an Upstart service. I'd like to use the post-receive hook to trigger actions that are required to update the application ...
8
votes
2answers
841 views

I need sudo without password prompt, for scripts. Where did I go wrong?

I am in sudo group all right: $ id uid=1002(molot) gid=1002(molot) groups=1002(molot),27(sudo),33(www-data) In my sudores I seem to have appropriate setting: sudo ALL=(ALL:ALL) NOPASSWD: ALL ...
0
votes
0answers
23 views

How to make sudo with POSIX shell better?

I have made changes to my Arch Linux x86-64 system where I run bash exclusively through what I think is POSIX mode, through using /bin/sh (linked to '/bin/bash') as my login shell and instead of ...
1
vote
2answers
771 views

Using root in fedora 20?

I want to be able to run commands as root... How do i do this? sudo yum install @kde-desktop cromwell is not in the sudoers file. This incident will be reported. I found a post saying to edit ...
1
vote
2answers
54 views

Ubuntu lost Sudo password

After a disk crash someone reinstalled Ubuntu for me. My su password works. They said they used no sudo password, but that doesn't work, and nothing else works. Can I reset the sudo password from ...
0
votes
1answer
29 views

Undocumented default values for sudoers' env_keep variable

I'm experiencing some strange behaviour. My sudoers file is very short and looks like this : Defaults env_reset Defaults mail_badpass Defaults ...
3
votes
2answers
222 views

Practical (closer to the classical Linux one) way to use (automate) SUDO for CygWin

Being able to use sudo commands in CygWin is useful, and faster than opening an elevated shell: Luis@Kenobi /cygdrive/c/Users/Luis $ net user /add TestUser System error 5. Access denied. Luis@Kenobi ...
0
votes
1answer
56 views

Regain access to Ubuntu server

I did a stupid mistake on my Ubuntu virtual server (Amazon). I was messing around with /etc/passwd & /etc/group files and i am about to lock my self out of the server for good. I have a copy of ...
3
votes
1answer
32 views

Ubuntu Linux sudo groupadd option menu keeps showing

I'm a beginner to Ubuntu and Linux. Every time I try to do a groupadd in my Ubuntu terminal the options for groupadd show up and I dont know why. I enter this in my home directory: sudo groupadd –g ...
0
votes
0answers
96 views

Seeing “sudo: effective uid is not 0” for users when an 'strace sshd' was running. Linux

Why would the following be a result of one user running strace sshd while another user attempts to use sudo? $ sudo ls sudo: effective uid is not 0, is sudo installed setuid root? The situation ...
0
votes
0answers
53 views

/etc/inittab combined with su - newuser failed to bringup new process with different UID than root

Using /etc/inittab on RHEL 6.3 x86_64 system, we tried to respawn a binary: aka watchdog from newuser UID login when restarted, not as a root UID process. Made the following changes as inline. ...
0
votes
1answer
146 views

Automated sudo and screen command

I would like to be able to launch a script in a separate screen command session as a separate user when I run a .sh script. Here is what I think it may be in the script: #I am also starting xampp ...
14
votes
4answers
2k views

How to prevent sudo users from running specific commands?

I have a very sensitive network setup and I really dont want to mess up with it. My network consists a bunch of users who are with sudo privilege. I want to stop them from running service ...
0
votes
0answers
163 views

What is the different between “sudo su” and “sudo bash”?

In Ubuntu 13.10, for the default setting, the following command in Terminal user@host:~/path$ sudo su results in entering an prompt root@host:/home/user/path# And this command ...
1
vote
0answers
40 views

Why is changing the shortname not recommended procedure?

Some Background I had an old iMac with Snow Leopard on it. It was so outdated I zeroed out the drive and reinstalled Snow on it (I'm still waiting on Mavericks to download... sigh). As I was setting ...
0
votes
0answers
54 views

How to connect Linux machines to a Windows Active Directory with different user rights?

I have a Windows Active Directory Setup with Windows Clients. So far our Linux machines did not authenticate against the AD, I used root to login. Now I wanted to add those Linux machines to the AD ...