sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

1
vote
2answers
44 views

how to give access to other user can access my account?

I have one server X, and having 2 user accounts A and B. How to give user access B to user account A.
0
votes
0answers
19 views

Problem Running Transmission/Deluge

I have been using Transmission/Deluge(mostly Deluge) on my Raspberry Pi now for a few weeks. I am facing this issue. Every time i click on a magnet link on the web, Firefox brings up Transmission and ...
0
votes
0answers
111 views

Sudo, Virtualbox, and Permission issues. (The Good, The Bad, The Ugly)

I hope the title didn't put you off as this is a fairly interesting and nuanced problem. I'm testing a development image of Linux Mint built by myself and a friend. I'm testing it out by trying to do ...
0
votes
1answer
59 views

Allow all commands via sudo but nopasswd for specific commands [duplicate]

I want to make sudo configuration such that one user 'test' should have access to all commands,all hosts like root. But for specific commands like 'ls /root' password should not get promted. I'hv ...
0
votes
0answers
16 views

Sudo access without any password prompt [duplicate]

I have set up sudoers.d file unix as below:-- User_Alias OOZIEUSERS1 = user1, user2 Runas_Alias APP1 = oozie Cmnd_Alias SU_APP1 = /bin/su - oozie OOZIEUSERS1 ALL = (root) SU_APP1 ...
0
votes
1answer
88 views

What's different between “su - username” then command and “sudo -u username command”

I have a problem about unixodbc. It show the error message about Can't open lib .... So, I use the ldd command to check. If I use su - username,the result like below: [root@ostest ~]# su - mysql [...
0
votes
2answers
62 views

Folder in /tmp won't delete despite the computer being restarted

There is a folder in /tmp/ that won't delete despite my computer being restarted. I know it's not being recreated at restart since the last edited and added date is 23 November 2015. I do know which ...
1
vote
0answers
126 views

Not permitted to add eth0 to bond0

I'm trying to add an interface to my bond0 but I always get the error. sudo ip link set dev eth0 master bond0 RTNETLINK answers: Operation not permitted I already tried it with sudo and with ...
0
votes
1answer
53 views

Cannot edit visudo

I have to give my user permission to run sudo. I am using CentOs # uname -a Linux lab-hv1-centos1 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux and have ...
2
votes
1answer
87 views

When can a user do `sudo su` but not `sudo su -`?

The following happened to me: $ sudo su - superman Sorry, user clarkkent is not allowed to execute '/bin/su - superman' as root in krypton101. However the following worked fine: $ sudo su ...
0
votes
0answers
358 views

sudo and su hang indefinitely… stumped

I am trying to run su or sudo on my CentOS 6.6 machine. Every time I try to execute either command, I get prompted for a password. After entering the password, the command simply hangs. I can ctrl+c ...
-1
votes
1answer
63 views

how can I run a command as superuser

I can log in as super user and run a program, now I want to check the status without logging in as super user. example: dev01:~$ sudo su dev01# forever list info: Forever processes running <...
1
vote
1answer
142 views

Sudo with NOPASSWD and service restart [duplicate]

I have an /etc/sudoers with the following: glens ALL=NOPASSWD:/usr/sbin/service php5-fpm glens ALL=(ALL:ALL) ALL And I'm trying to run the command: sudo /usr/sbin/service php5-fpm restart ...
0
votes
0answers
20 views

Restrictions made with sudo are applicable since login or only when sudo command is used?

I need to restrict users to run some commands, they already have ssh login, but i need that some users (defined in different groups) been able to run some commands. The easiest way is with sudo (and ...
2
votes
2answers
253 views

Why running command as sudo returns command not found?

Sample command: drush cc all works, but this: sudo drush cc all gives me: sudo: drush: command not found Why? How to fix this?
6
votes
1answer
163 views

Managing another user's systemd units

Can one user, or maybe root, control another user's user level systemd services? I've tried sudo -u <some user> systemctl --user restart <some service>, but it complains about dbus: ...
1
vote
0answers
73 views

How to install framework on remoter server without root privileges

I'm trying to install caffe deep learning library on my university cluster grid running on Debian. The grid has some preinstalled modules, such as python, CUDA, compilers etc. The problem is, some of ...
0
votes
2answers
210 views

Execute browser as root

I need to run my browser as root, in order to gain Citrix receiver, which is executed within the browser, permissions to access and edit the hosts file. Otherwise I get this error: You do not ...
3
votes
1answer
90 views

Auto sudoers entry on ssh login by a non-sudo user

This problem I am facing in Gcloud VM (ubuntu 14.04 image). As a admin user, if I create another user say UserNew without giving sudo privilage to him. sudo adduser UserNew I carefully checked ...
0
votes
1answer
74 views

pkill in a script

I am trying to kill a process by his name in a script. Process : toto 15408 1 0 Nov13 ? 00:20:36 java -Xmx512m -XX:MaxPermSize=128m -cp /local/toto//conf/:/local/toto//lib/* com.toto....
1
vote
1answer
63 views

Why does TurnKey Linux not have sudo installed by default, if you're never supposed to login as root?

As I understand the sudo command (and maybe I'm wrong) it's a way to run what you need to run as root, and then get out as quickly as possible. But I read in the forums for TurnKey Linux that they ...
2
votes
1answer
164 views

Why are the #include and #includedir directives in sudo prefixed with the pound (#) character

While setting up a sudo environment I noticed that the include directive is prefixed with the pound (#) character. Solaris shows this as: ## Read drop-in files from /etc/sudoers.d ## (the '#' here ...
1
vote
1answer
26 views

mount permission mechanism for file explorers [duplicate]

When I execute a script that uses the "mount" command, I need to enter my sudo password. However, I can launch a file explorer like nautilus and mount a filesystem from that application, without ever ...
1
vote
1answer
266 views

sed and sudo with string replace

I want to replace a string with sed and save changes to same file which needs sudo as its a root owned file. But while doing that I am getting below error raja@raja-UbuntuVM:~$ sudo sed 's|gateway ...
3
votes
3answers
115 views

How to set a password that violates password constraints without changing constraints using sudo

I have root access on a machine shared by others. I think the password constraints are absurd, they are overly excessive in how they mandate the use and ordering of non word characters and make ...
2
votes
1answer
270 views

Read from /dev/input devices without root privileges

Is there a way to read from /dev/input devices, without needing root privileges? In my case, I would like to use the Python library evdev to read from multiple keyboards (so that I know which ...
0
votes
0answers
130 views

Escape special characters in password on remote machine

I'm trying to run sudo -i on the remote machine and send password in the same line. Faced with the problem of when the password contains special characters; escaping does not help. I would be glad ...
1
vote
2answers
165 views

reset system file permissions, owners and groups

Mac has a utility that checks permissions of files installed on your system to make sure they have the correct permissions as per an installation. Is there something like that with LinuxMint. I am not ...
0
votes
1answer
46 views

What is the difference between Runas_List and User_List in sudoers file on Linux

I have gone through the man page and it states the following: A Runas_List is similar to a User_List except that instead of User_Aliases it can contain Runas_Aliases Looking at the definition of ...
1
vote
1answer
169 views

want to su without password inside shell script

I have written a script which will run a script for a backup before: # cat backup-before-shutdown #Scritp to take backup before shutdown #Author Ashish Karpe echo "Taking backup to s3" su ubuntu /...
2
votes
3answers
75 views

Change files with Editor that need sudo permissions

I want to change files with KomodoEdit, that need sudo permissions. I cant start KomodoEdit with sudo tho (for whatever reason). Can I somehow grant Komodo permission to edit those files (in ...
0
votes
1answer
94 views

How do I modify contents of a directory without sudo?

I'm trying to modify the contents of a directory using git. Problem is if I use sudo it nullifies my ssh forwardAgent. I'm not the owner of the directory but I am part of it's group. If I chmod 775 ...
0
votes
3answers
1k views

sudo: “effective uid is not 0, is sudo installed setuid root?” on a Raspberry Pi

I have been using a Raspberry Pi for a few weeks and put a lot of hours into configuring everything for my university project. I wanted to install Samba and have everything as a network folder. I ...
1
vote
2answers
235 views

Enable user to execute one command as another user

The goal is to let the www-data user execute sudo -u postgres -H osm2pgsql [some options here] without being asked for a password (as this will be part of a script wich runs automatically). I thought ...
0
votes
0answers
15 views

Alias not working with sudo [duplicate]

I have made a alias to view the log of my OpenVPN: luis@Terminus:~$ cat .bashrc | grep "vpn" -i # Alias para OpenVPN: alias ConectadosOpenVPN="cat /etc/openvpn/openvpn-status.log" But it must be ...
1
vote
2answers
209 views

How can a script run privileged commands on a remote system without sudo or ssh passwords?

I'm looking to set up my sudoers file correctly, but the documentation I've found doesn't seem to help. I have a user, e.g. user1 I have two Debian servers, server1 and server2. At present I can ...
1
vote
2answers
111 views

how to remotely execute a shell script with elevated privileges

I have two servers, serverA and serverB. At present I run a shell script on serverA that creates a file and 'pushes' it to serverB. The shell script runs as a cron every hour and requires SUDO ...
0
votes
1answer
38 views

Can Webmin run as sudoer instead of root? [closed]

Have someone some experience with using xinetd with a user which is not root, but instead a sudoer? The operations that are required to be done do not always requires admin priviledges : ex ...
1
vote
1answer
181 views

Restart PHP-FPM from a PHP script

I am running a LEMP stack and wish to write a simple control panel for it. So, I want to be able to restart php-fpm from a php script. To achieve this, this is what I did. Created a binary wrapper ...
0
votes
1answer
30 views

How can I put a user in the superusers file?

I have just installed the command sudo but when I use it returns that I am not in the sudoers file. What should I do?
2
votes
2answers
1k views

using sudo -u <name> to run commands inside shell scripts

I'm extremely lazy, and prefer to write scripts to automate compiling software. To me, as these scripts can get quite long, it's easier to run them as root but have the individual software compile as ...
0
votes
0answers
64 views

Doesn't these program respect nsswitch?

I've set up LDAP and nsswitch on ubuntu and to some extent it seem to work. For example getent passwd lists accounts from both /etc/passwd and LDAP server. However for example id <user>, sudo -...
2
votes
2answers
269 views

Input password on sudo command

Can I input a password on the sudo command itself? Something like: sudo rm (dir) -p (password) I used sudo help but couldn't find a correct syntax (if there is one)
53
votes
11answers
10k views

Why do I have to use sudo for almost everything?

If I understand the Linux philosophy correctly, sudo should be used sparingly, and most operations should be performed as an under-privileged user. But that doesn't seem to make sense, since I'm ...
1
vote
1answer
98 views

Updating /etc/sudoers file in bash

I am trying to update my sudoers file to preserve the http_proxy environment variable but it keeps getting corrupted The bash script is as follows printf 'Defaults env_keep += "http_proxy ...
1
vote
1answer
35 views

`sudo tar` but own the resulting file

I want to put a bunch of files into an archive with tar. However, I don't have permission to access all of them, so I have to do sudo tar. However, now that root has run the tar, the resulting ...
1
vote
0answers
22 views

How do I escalate a signal?

For the past week, I been having a bug that my python code hasn't been doing a cleanup process properly. It was suppose to once it captures a signal caused by closing the terminal, it does some ...
0
votes
1answer
209 views

Valid root/user passwords not working on EC2

There is an authentication failure when I'm trying to enter password for any of my accounts after an update using yum. My authentication got broken, while everything else works. The updates were ...
0
votes
2answers
89 views

Automatically rerun something with sudo if root needed [duplicate]

I'm running Arch Linux in a virtual machine and it's getting REALLY annoying that since some thing require that I cannot be root, I need to sudo most of my commands. It would be nice if I could do ...
4
votes
1answer
173 views

Load aliases from .bashrc file while using sudo

I have set aliases for a few programs in the .bashrc file, and they work fine without sudo and they don't with sudo. Is there a way to get those aliases work with sudo? For example: nano text.txt #...