sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

0
votes
1answer
37 views

Linux Sudo Without Password Prompt

I want to run a bash command at startup (~/.config/autostart/myCommand.desktop) that requires sudo, but rather than it prompting me every time, I would like to include the password in the command, ...
0
votes
0answers
13 views

Eclipse does not launch without sudo

On my Fedora (Fedora 22 Workstation) system, I recently installed Eclipse (sudo dnf install eclipse-platform). However, I am unable to launch Eclipse without using sudo. I would prefer not to have to ...
3
votes
2answers
45 views

What is the problem of giving the right to use sudo vim? [on hold]

I'm using Mac OX 10.10. I would like to know what problems are caused by this: user ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf I think this is in /etc/sudoers. I also have Cent OS. Does this ...
2
votes
1answer
49 views

ldd shows library exists and is linked, program doesn't find it

Console Output: bitnami@linux:~$ sudo svnmucc propset svn:needs-lock 1 file:///opt/bitnami/repositories/Standard/Ipc/trunk -m "test set" svnmucc: error while loading shared libraries: ...
3
votes
2answers
65 views

Why user without any PASSWD entry in sudo config has to authenticate every time?

Consider this sudo config for two users: mary ALL = (ALL) NOPASSWD: /bin/ls, /bin/cat bob ALL = (ALL) PASSWD: /bin/sort Now, when user mary executes any command not in the list she has to ...
1
vote
4answers
55 views

What's the difference between sudo su vs just su?

I see a lot of posts out there that say you type in sudo su to get an interactive prompt with root privileges, and I see equally many posts debating the pros and cons over sudo -i vs sudo su. Here ...
0
votes
1answer
24 views

ssh master - execute su remotely

I have a server S that I need to connect to. I'm connecting to S as user asdf with control master and after that I perform some stuff: ssh -N -f -M -o ControlPath=$SSHSOCKET ${USER}@${IP} -p ${PORT} ...
-1
votes
2answers
69 views

When in debian 8.1 why is the super user ran with su not sudo? [closed]

Just curious about why super user is ran and not super user do.
0
votes
2answers
40 views

error when adding user to wheel group in CentOS 7

I am trying to grant sudo privileges to a user of a CentOS 7 devbox by typing gpasswd -a user wheel, but the attempt is failing. What am I doing wrong? Here is what I typed: I discovered that ...
2
votes
1answer
90 views

Why root bash output is colored but `sudo ls` output is not?

In bash (Ubuntu) I get colored outputs either as root (after sudo su) or as a normal user. I checked (after reading this post) the files .bashrc for normal user and superuser and the options related ...
3
votes
2answers
42 views

How to stop sudo PAM messages in auth.log for a specific user?

I am using Zabbix for monitoring my environment and zabbix_agentd executes as user zabbix one custom script every 60 seconds; it uses sudo to run this script as root. In /var/log/auth.log I see every ...
0
votes
0answers
19 views

debian 7 sudo email notification

I edit sudoers by visudo: Defaults env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" Defaults mailto = "me@domain.com" Defaults ...
1
vote
2answers
42 views

run command with sudo su in script and redirect stdin and stdout

I need to run command as another user and write to its stdin and read from its stdout. I can run command as another user only via opening new shell: sudo su anotheruser but with new opened shell i ...
1
vote
1answer
29 views

make sudoers use their own history file

I just can't seem to get a simple answer to this one. All I am trying to do is get a sudoers to use their own history file, but if I set the history var in the .bashrc for root with $user, the $user ...
0
votes
2answers
27 views

Disable some programs from sudo

I have a group of trusted developers which I have given sudo permissions on a server but I want to be able to exclude some programs to be run with sudo. For example I would like to disable command su ...
1
vote
1answer
33 views

How do you sudo with xonsh?

I get the error xonsh: subprocess mode: permission denied: sudo.
0
votes
2answers
23 views

sudo host field: what is it used for?

syntax for sudo is user ALL=(ALL) ALL whereby: 1st field is the user that can execute sudo 3rd field is the users that can be sudo into 4th field is the commands that can be executed as ...
1
vote
0answers
18 views

Is there a way to automatically use sudo whenever I get “Permission denied”? [duplicate]

Is there a way to automatically use sudo whenever I get "Permission denied"? I dont want to become superuser, sens I still want to be asked for the password in such cases. I just dont want to wright ...
0
votes
0answers
20 views

Multiple here documents in a bash script to drop in and out of sudo is causing error “Sessions still open, not unmounting”

I'm attempting to write a setup script that I can run on multiple machines to run a bunch of installers (requires sudo) but also do things like pull down a git repo (I want to run that as the normal ...
0
votes
0answers
22 views

How can I run a command as root user on Ubuntu? [duplicate]

It seems Ubuntu has disabled the root user account so su doesnt work which is causing me an issue where I have an apache log file that is owned by root $ls -al error.log -rw-r----- 1 root adm 2061050 ...
1
vote
1answer
25 views

User settings for monit? Should it run as root, or it's own user?

I'm trying to install monit on an Ubuntu 12.04 server. I have it set up, and configured (i think), but i'm not sure what user it's supposed to run as. My user on the server is called deploy, and my ...
2
votes
1answer
44 views

How can I use different kerberos principals for sudo than for system-auth?

At my organization, we're required to use different kerberos principals when authenticating for sudo than for other types of auth, such as logging in. For instance, my regular (login) principal might ...
5
votes
1answer
37 views

Running Deamon Involving GPIO on Pi

I have a deamon that monitors various things using the GPIO ports. I have used python to write the code for this using the RPi.GPIO module. I would like to ensure that the deamon is always running, ...
2
votes
3answers
197 views

`tail -n 40 /var/log/apache2/error.log` without `sudo`

Many times during the day I need to inspect my Apache log: sudo tail -n 40 /var/log/apache2/error.log I then have to provide my password. It's a clumsy workflow, so instead I am adding ...
1
vote
1answer
19 views

Does loginuid have any impact on process limits?

On CentOS/RHEL 6, when I start my daemon as root user, I see /proc/<pid>/loginuid of the process as 0 and when I start it through sudo, I see loginuid of the sudo user. Even if I do sudo su - ...
43
votes
4answers
2k views

Is there ever a good reason to run sudo su?

To launch a root shell on machines where the root account is disabled, you can run one of: sudo -i : run an interactive login shell (reads /root/.bashrc and /root/.profile) sudo -s : run a non-login ...
8
votes
1answer
102 views

Why does sudo need the loopback interface?

We were trying to install our software on an Ubuntu machine. To do so, we needed root privileges. Basically, all we needed to do was run a runnable jar like: sudo java -jar runnableJar.jar. All such ...
1
vote
0answers
79 views

Ubuntu 14.04.2 LTS: for NIS users, SSH works but console login and sudo fail

I set up a fresh Ubuntu 14.04 LTS VM on VirtualBox and did an upgrade, so now I'm sitting at 14.04.2. Our office environment is NIS+NFS. I set up autofs and NIS, and confirmed that I can log in as a ...
6
votes
4answers
489 views

Bash, execute command after invoking a new shell

I am trying to make a script like this: #!/bin/bash sudo -s something... When I execute it, I get a new shell but something is executed only when I exit the shell created by sudo -s, not inside it. ...
3
votes
1answer
93 views

Possible to pipe command using su via ssh

I'm trying to write a python script to remotely update the login passwords for a set of account I administer - I can already successfully use python to pipe remote commands via the stdin of an ssh ...
0
votes
0answers
40 views

sudo: setreuid(ROOT_UID, user_uid): Operation not permitted

I get this in my debian wheezy. I do not know what to do. I get it with every sudo command. Su password fails every time. I have seen people suggesting running service ncsd stop and then start it but ...
0
votes
1answer
25 views

Set root password AMI linux

I need set a password for root on EC2 AMI linux. I have tried with passwd root but if I enter with ec2-user and run sudo su, I get a root bash without asking for a password.
-1
votes
1answer
45 views

Error while installing wget and unzip

I am trying to install wget and unzip on unbuntu machine. But i am facing the below issue. sudo apt-get install wget unzip
11
votes
2answers
742 views

How do I make sudo remember my password for longer?

How do I make sudo remember my password for longer so that I don't have to keep typing it? I do not want to sudo su and execute commands as root all the time. I am on Arch Linux and have tried to ...
2
votes
1answer
132 views

When i run “sudo su” i get --bash: command not found for everything

I'm not good with command lines nor servers. But I needed to configure for work a AMI of EC2 AWS with LINUX So I've installed a lot of stuff, moved a lot of stuff around and then I realized that sudo ...
2
votes
1answer
55 views

Running sudo restricted commands by creating soft link

I have sudo access to one of our test machines and the following are the commands restricted for me: user_sree@sel8585:~> sudo -l user_sree's password: User user_sree may run the following ...
0
votes
1answer
35 views

When I execute a .run file as <user> it works fine. If I sudo run it, it cannot detect Java

I am trying to execute a .run file that will install some applications. I'm installing the application in /opt/... When I run it without sudo, the installer runs correctly but cannot write to /opt/. ...
1
vote
3answers
67 views

Recommended way to install software to /usr/local — use sudo or chown?

I'd like to install software from source (e.g., third-party GitHub repos) to my machine. Generally /usr/local/bin and /usr/local/src are for non-distribution-specific software, right? Taking ...
0
votes
2answers
80 views

root access on new chromeos lenovo n21 for python dev

We've purchased several new Lenovo N21 chrombooks to run Python workshops for inmates in the local jail. Trying to install Crouton, Debian, and Anaconda to prepare. All require developer mode and ...
2
votes
1answer
40 views

Is granting unattended-upgrade command to non-sudo users safe?

I have found out that I give get a non-sudo user access to certain commands with the sudo privileges. However, my plan to allow them to run apt-get dist-upgrade the system is not safe because they ...
2
votes
1answer
27 views

Allow certain guests to execute certain commands

I would like to create a new user on some of my Debian/Ubuntu hosts that is able to update the server using the commands apt-get update and apt-get dist-upgrade, but I do not wan't to give them full ...
2
votes
4answers
319 views

Sudo complains “is not in the sudoers file”

I try to install Chrome and Skype on Debian. When I'm trying to install from the terminal, or log in as administrator, even when I type the correct password, every time I receive a error. What am I ...
0
votes
1answer
123 views

How to run multiple sudo commands over already opened ssh connection

I am trying to navigate from one server"USER1" to another using ssh as a user "USER2". ssh -t $hostname "sudo su - USER2; whoami; pwd" Post executing the above, I am able to successfully navigate ...
0
votes
0answers
36 views

I can launch an app as 'myuser', and as 'root', but not using 'kdesu'. How do I launch wth 'kdesu'?

I'm running SublimeText editor on Opensuse/64. If I exec it as 'me' $ whoami dop $ sublime_text the app opens like normal, using config in /home/dop/.config/sublime-text-3/ If I change to root ...
0
votes
0answers
38 views

Use sudo in apache with SELinux

I am using CentOS 6.5. using Apache, I want to use sudo in exec. It works when SELinux stopped. how to configure SELinux to permit it. The php script <?php exec('sudo -u newuser ls /',$output); ...
2
votes
1answer
51 views

How to do sudo edit in MC?

Sometimes, when I use mc I need to edit file with sudo. Is there a way to run mcedit (internal MC editor) or any other editor with sudo directly from MC (by pressing F4)?
1
vote
1answer
65 views

Run openvpn without root privilegies

I am working with openvpn, when I type: $ sudo openvpn Every is fine, but when I type: $ openvpn bash: openvpn: command not found I try in my Debian 8 with this instructions but in Jessie I can ...
3
votes
2answers
99 views

command substitution: /dev/stdin: Permission denied

Want to read whole stdin into variable. Don't want to spawn new processes. From bash manual: The command substitution $(cat file) can be replaced by the equivalent but faster $(< file). It ...
0
votes
1answer
25 views

Install script - sudo authorisation compatibility?

I am currently updating a few scripts, and am planning on releasing some useful ones so others can use them (so they need to work across a wide range of machines without crashing, and without breaking ...
0
votes
2answers
33 views

Understanding Privileges in Sudoers File

I'm trying to make sense of the sudo documentation on the Debian Wiki. On it, it uses the two examples below. However I don't understand the difference between them. Why has the group sudo got ...