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

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 ...
1
vote
0answers
198 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
55 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 ...
0
votes
2answers
38 views

Upgrade user to skip using sudo to write files

I need to run a Capistrano recipe to setup some services so I have to be able to write to /etc/init without prefixing my command with sudo. How can I make an Ubuntu user abel to write to /etc/init ...
0
votes
0answers
106 views

pip: which pip.conf will be used?

Commonly used to install python packages sudo pip install <package> To use a different repo, I edited ~/.pip/pip.conf [global] index-url = http://<hostname>/simple That works on my ...
0
votes
0answers
25 views

program needs to be run as root by any user and can be located anywhere

I have some program called foo that needs root privileges when it executes. foo needs to be able to be run by any user and can be located at any path. The reason this program can be at any path is ...
2
votes
3answers
1k views

How to login as root from Bash and do stuff

This is my simple bash: cat test.sh #!/bin/bash echo "hello" su - root -c /path/to/script.sh <<EOF password EOF whoami echo "good bye" But I get this error: ...
2
votes
1answer
126 views

difference between root executing command as sudo vs not using sudo?

I have a Linux question regarding the sudo command and the root user. If I log into the root user using the su command, what is the difference between the following two commands? root> sudo ...
1
vote
1answer
118 views

How can I override a default of rootpw in sudoers

I have a sudoers file with many entries. At the top is a Defaults setting: # default sudo password is the ROOT password (not the invoking user's password) Defaults rootpw However there is one ...
1
vote
1answer
161 views

Sudo and file permissions

I am configuring sudo on a server and have the following question. I only want a user group to run the /sbin/ifconfig. I have configured sudo: User_Alias ​​NETWORK = user1 Cmnd_Alias ​​NETWORKING = ...
1
vote
2answers
97 views

Sudo doesn't work on Aliases

I have added alias ll='ls -la' in /etc/bash.bashrc but sudo ll is not working. Is there a way to "source" bash.bashrc? In a related post, another user suggesting creating an alias for sudo with a ...
0
votes
1answer
12 views

Why am I still able to write to a directory after I have changed permissions at the terminal?

I am running Mac Os 10.9 and connecting to a Mac OS server (10.8?) over our local network where I have an admin account. I regularly sync 3 directories from my machine to the fileserver using rsync. ...
-1
votes
2answers
66 views

Using SUDO to execute a general command inside a non-accessible directory

I want to grep something inside a directory. But the user dont have permissions in the direcotry. Because of some reasons, i am not allowed to change permissions, group or owner. Just want to know i ...
1
vote
2answers
67 views

To install and use Django 1.4.1 without sudo access

I want to install this software to a server where I have no sudo access. They have Django 1.2.x installed there, but the software needs Django 1.4.1. The server has the adapter between Python and ...
3
votes
3answers
3k views

command not found when using sudo

There are a few question on the site that seem related to my problem but I could not find a solution in any of them. My operating system is Ubuntu 12.04. I have mvn installed in ...
0
votes
3answers
51 views

Sudo access issues with passwd

I have sudo configured like this: joe ALL=(root) NOPASSWD: /bin/su - steve What it does exactly? I am confused. I guess there's three different ways to execute that command: su - steve sudo su ...
0
votes
1answer
254 views

I accidentally deleted the home directory on my Amazon Linux EC2. My whole site disappeared. What now?

I was using sudo rm -rf to delete some folders, and accidentally deleted the /Users/ec2-user home directory. I had my EC2 and AWS Route 53 running my site. Now, it just disappeared. I have all the ...
0
votes
0answers
33 views

Why can a non-root user not access Sublime soft link

I like using Sublime text as a VIM replacement i.e. opening from the terminal with an argument. I installed Sublime into /opt/sublime_text/ and within that is the executable I need. I then soft-linked ...
0
votes
1answer
31 views

Issue Uninstall Xcode 3.2.6 Snow Leopard

Xcode 3.2.6 is here -> /Applications/Developer/Applications/Xcode uninstall --> $ sudo Applications/Developer/Library/uninstall-devtools --mode=all Problem--> sudo: ...
4
votes
1answer
56 views

Passwordless sudo works for one user, but not for another

I struggle to create passwordless sudo for one user on my Debian server. I've added the following line to the sudoers file: deployer ALL = NOPASSWD: ALL but it doesn't work. To my surprise, I can ...
0
votes
0answers
15 views

Giving permission to a particular user to start/stop a particular service

I want to give permission to a normal user to start/stop a particular service only. Then how can i tweak the sudoers file to achieve this?
1
vote
2answers
68 views

How do I configure a Debian so that multiple users can do administration, but not see each others' personal files?

I'm looking to set up a server to share with a group of people. The machine will run Debian GNU/Linux, and we would like to allow multiple people to do administration tasks (in particular installing, ...
0
votes
2answers
505 views

Ubuntu: Write to serial port: permission denied

I've connected a USB to Serial bridge dongle, and running dmesg | grep tty outputted the following: [ 0.000000] console [tty0] enabled [603199.380677] usb 2-2: cp210x converter now attached to ...
0
votes
0answers
34 views

sudo: Who am I really? [duplicate]

I am experiencing some weird inconsistencies using sudo. Users: carl, root Command: MakeHotdog root@laptop$ MakeHotdog Hotdog has been made! carl@laptop$ MakeHotdog Hotdog has been made! However, ...
0
votes
4answers
215 views

How to do sudo apt-get on an AIX machine

I don't understand this AIX. How do I do sudo apt-get on AIX? -bash-3.00$ sudo -bash: sudo: command not found -bash-3.00$ apt-get -bash: apt-get: command not found
0
votes
2answers
4k views

Reset root password or enable sudo on MacOS X Mavericks

I have a MacOS X Mavericks installation with a single user Admin and empty password for that account: Now I'm trying to install Cocoapods, but can't use "sudo", because I don't know the root ...
0
votes
2answers
73 views

What's wrong with this configuration of sudoers file?

I have to execute a shell script as another user, but without being prompted for a password. I've edited the /etc/sudoers file with visudo, adding the following line. _www localhost=(otheruser) ...
0
votes
0answers
30 views

What is wrong with this configuration of sudoers file?

I have to execute a shell script as another user, but without be prompted for password. I've edited the etc/sudoers file with visudo, adding the following line. _www localhost=(otheruser) ...
1
vote
3answers
155 views

How to exit the super user from middle of shell script?

I have a shell script in which most of the commands need to be run under sesu user and then I need to run some commands as current user. Can you please help me in this?
1
vote
1answer
42 views

sudo is messing path order

I'm having a little issue with my PATH when I use sudo : My PATH from user shell : /usr/local/bin:/usr/bin:/bin:/opt/bin My PATH from root shell, via su or root login on TTY : ...
0
votes
2answers
1k views

How do I fix an invalid /etc/sudoers file if root access is disabled?

This pertains to my Raspberry Pi, on which I have Raspbmc installed. I do realize that there is a Raspberry Pi StackExchange site, but I figured I might get more eyes on this problem here. The issue ...
0
votes
2answers
130 views

Shebangs do not like sudo in OSX

Using sudo in the shebang seems completely broken. The following code: #!/usr/bin/sudo /bin/bash echo "this should work" works fine on Ubuntu, but on OSX gives me: sudo: effective uid is not 0, is ...
0
votes
0answers
51 views

“chown” for “make install” command?

On my Linux server, I accidentally executed sudo make install for an application install. I intended to execute make install without sudo privilege. How do I change the ownership of all installed ...
1
vote
0answers
37 views

sudoers syntax for specifying a list of executables

I want my user (username "wim" in group "wim") to be able to use sudo apt-get and sudo dpkg without needing admin password. I tried editing sudoers file with sudo visudo, and I added in this line: ...
1
vote
1answer
272 views

SELinux transition from unconfined_r to user_r

On a Fedora 18 machine, I have the following SELinux context as a regular user created during installation: $ sestatus SELinux status: enabled Loaded policy name: targeted ...
0
votes
0answers
62 views

Change all commands in custom application menu on Debian

so what I have is applications that's supposed to run as root, what I want to do is to add a sudo in the beginning of each command with a single bash script, so I can run these programs directly from ...
0
votes
0answers
23 views

deleted crontab on remote machine, but I don't know how

Here's the scenario: I have ssh access to internal.foo.com through bridge.foo.com. I wanted to make a local copy of the crontab from userx on internal.foo.com. My user has sudo access on ...
0
votes
0answers
64 views

Run a specific program with root privilges without asking for password everytime

Many times, i need to connect modem using SAKIS-3G script and because modem-manager sucks many times. I need to supply admin/root password, everytime i need to run sakis-3g script. I am the only ...
3
votes
3answers
808 views

“X is not in the sudoers file. This incident will be reported.” Where?

"X is not in the sudoers file. This incident will be reported." Where is it reported?
1
vote
2answers
909 views

su & sudo on Mac OS X 10.9/Server 3.0

I am trying to use su and sudo on my iMac that I did a fresh clean install of Mac OS X 10.9 and Server 3.0. I explicitly set the password for root with passwd root but when I try to use su or sudo ...
1
vote
1answer
473 views

Disabling SU on all new users on Debian

I'm new to Debian, but learning things very fast. Working on Debian Wheezy, and I realize that if I create a new user with useradd, the user gets sudo rights! To test this, I log in with the new user ...
0
votes
1answer
514 views

su in shell script started from ssh works in other terminal

Sorry my dumb question but I don't know how to describe my situation. There are logs from Jenkins: ssh www.myserver.com '/var/lib/tomcat7/webapps/deploy_webapp.sh' + id uid=1004(jenkins) ...
1
vote
1answer
1k views

Can't install Parallels Tools on Debian 7.2.0

(Parallels Desktop 9, latest version) As per instructions, I switch to root: $ su - root $ whoami root $ echo $EUID 0 and then execute the installer: $ cd /media/cdrom0 $ ./install and I get ...
3
votes
1answer
203 views

Can't Get libpam-ssh-agent-auth Working In Ubuntu 13.10

I've been wrestling with this particular issue most of the day, and have been making SOME progress, but I'm still a bit stuck. I would like to be able to authenticate an SSH session using a private ...
0
votes
1answer
34 views

Getting molly-guard to work with sudo

The program molly-guard is a brilliant little tool which will prompt you for a piece of information before you reboot or shut down a system. Usually it asks for the hostname. So when you work a lot ...
1
vote
1answer
374 views

Can't validate mine, sudo nor root in Debian “Jessie” Gnome anymore?

I'm Debian beginner & GUI guy in a bit of trouble? Can't login as sudo/gksu/root/su nor as (main/super)user after removed user password via Gnome-user-settings. History of actions (Probably ...
3
votes
1answer
156 views

How does sudo actually work?

How is it possible for sudo to actually function? If it's just a normal program, couldn't you make the same thing without requiring the user to authenticate, giving anyone with access to a computer ...
0
votes
2answers
116 views

Using the root account on a single-user system [closed]

On Linux systems it is widely considered a best practice using the root account only on occasions that necessitate administrative privileges, or disabling it altogether and relying solely on sudo to ...
0
votes
2answers
158 views

User not in sudo list but can still use sudo

I am running Fedora 17. My user was created during the live cd install and has root/admin privileges. Hence, I use the sudo command to perform root actions. E.g sudo iftop I enter my password and ...