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

7
votes
2answers
644 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
19 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
31 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
42 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
12 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
64 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
23 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
15 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
18 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
15 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
50 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 ...
13
votes
4answers
671 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
32 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
36 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
37 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
29 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
25 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
21 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
248 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
82 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
32 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
73 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
49 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
11 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
44 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
39 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 ...
2
votes
3answers
407 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
38 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
138 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
27 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
23 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
45 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
13 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
51 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
145 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
131 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
2k 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
62 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
25 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
89 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
28 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
529 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
91 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
41 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
32 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
120 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
38 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
21 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
53 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 ...