sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

0
votes
0answers
15 views

Unable to use Nautilus

I've got Trisquel 7 GNU/Linux distro, with GNOME 3.8.4. I'm finding impossible to create a folder in Nautilus, or drag and drop files into the Desktop, out of other options. I find this quite ...
0
votes
1answer
6 views

Setting www-data (lighttpd) as sudoer not working

I have installed lighttpd with fast-cgi on the raspberry pi. When running a python script that requires root priveleges, I get the following error: RuntimeError: No access to /dev/mem. Try running ...
1
vote
1answer
56 views

How do I maintain sudo in a bash script?

If I run this script, how do I pass super user permissions to it? I wrote this just to setup new machines with the basics. I don't want to run every command with elevated permissions, but the commands ...
3
votes
1answer
161 views

How to use sudo -u option?

I have 2 users, userA and userB. userB needs to run some commands as userA. I have specified these options in /etc/sudoers as below: userA ALL=(ALL) ALL userB ALL=(vinoth) /sbin/fdisk I ran this ...
1
vote
1answer
18 views

Getting syntax error in sudoers file I don't understand

I have an embedded system with the root mounted as read only. I want to set up so my sudo users are able without a password change the setting (I plan to use the commands in the login and logout ...
1
vote
1answer
37 views

Running a Bash expression from sudo

I can list my recent apt-get history with:- zcat /var/log/apt/history.log.1.gz I am trying to automate this for all history files. I tried: sudo for logf in $( /var/log/apt/history.log.?.gz ); do ...
2
votes
1answer
72 views

Strange bash script behaviour

I have two bash scripts, which are binary identical, have the same permissions, are unique on my drive and are not found in sudoers. Still one passes the uid test for root, the other one not. If I ...
1
vote
0answers
19 views

User can sudo although he is not in sudo group nor in /etc/sudoers

I have two colleagues on a Red Hat Enterprise Linux Server (release 6.4). Both of them can execute the sudo commands. Curiously, only one of the colleagues is in the /etc/sudoers file - let's call him ...
1
vote
2answers
60 views

Why do I still need to run shutdown as sudo after this?

I'm running Linux Mint 17.3. By default, running shutdown or other commands like reboot, poweroff requires root privilege. So I added the following line lesaff_b ALL=(ALL) NOPASSWD: ...
-1
votes
1answer
54 views

Report of sudo usage

How do I get a report (either CSV or an Excel file) on who is using sudo on my machine, and which account they're switching to?
0
votes
1answer
29 views

Why doesn't 'sudo' skip hostname-checking when the command can be run on 'ALL' hosts?

The sudoers file provides a way to limit which "runas" entries apply to which hosts. When running a command with sudo, the hostname is checked against the hosts on which a "runas" entry applies. When ...
2
votes
2answers
51 views

OpenSUSE disabled root login (no root psswd set) >> yast, config issues

I disabled the root login on my system (blank password). Now I cannot configure my system from GUI (it asks for the root password). Everything is fine in CLI (e.g. launch yast2 from CLI works ...
0
votes
1answer
32 views

Add AD users to sudo group not working | CentOS 6.7

Just as the title states I am on CentOS 6.7 and want to add two domain admins to the sudo group. I have tried adding both users individully and both together see below: someuser ALL=(ALL) ALL ...
1
vote
1answer
39 views

PermitRootLogin No and Sudo user – Where is the difference?

So, I've read that I shouldn't permit root logins by disabling them in my sshd_config. I understand how that might make a server safer, but if I have a user that is allowed to do "su root" and log ...
-3
votes
2answers
46 views

How are setuid, suid, sudo, and su all related? [duplicate]

I have a feeling the setuid bit, the nosuid mount option, sudo, and su are all related given their names. But how do they relate to one another? Are some of them used in conjunction? If they are not, ...
0
votes
1answer
52 views

How to fix a corrupt .profile file for sudo user

My knowledge on unix is very less. I updated .profile file for sudo user but some path was incorrect in that file. When I am trying to reconnect as a sudo user it does not recognize any commands and ...
0
votes
1answer
25 views

How can I undo a 'sudo' command before entering the password?

I typed sudo [bad command]. The system is asking for my password. I do not want to run this command. How can I exit the password-request prompt?
2
votes
2answers
22 views

Lock A Built-in Application?

I know I am able to lock an application using: sudo chmod a-x /Applications/'Application'.app but I encountered a problem while trying to lock an application, like safari, which is built in. ...
-1
votes
1answer
20 views

Ask password in window mode after sudo or other command line operations?

Was seen in movies, that after command line operations, the password was asked in separate GUI window. From my (small) experience, password, required from command line, was always asked in command ...
3
votes
0answers
26 views

exists a “two-factor authentication” for sudo, if not how to make one anyway?

tl;dr normaly to gain root priviledges via sudo requires a special user account and the use of its passphrase as means to authetication. Due to keylogging/replay (in X.org session) attacks, I would ...
1
vote
1answer
41 views

Centos 6.7 broken Sudo

After installing devtoolset 2, it appears my sudo command is broken. readlink -f $(type -P sudo) /opt/rh/devtoolset-2/root/usr/bin/sudo I believe the commands I ran to install devtoolset2 ...
1
vote
1answer
88 views

Why does running sudo cp show two processes

I am trying to copy some files and folders on a Centos machine. I do it like so: sudo cp source destination & to run it in the background. I see there are three cp processes now when I run ps ...
0
votes
1answer
24 views

Is sudo useful to protect my data from malwares?

I'm considering creating a separate account for browsing, and launching my browser with sudo -u browseraccount {firefox,chromium,etc}. I wonder if this can prevent a malware (especially ransomwares) ...
0
votes
1answer
78 views

How do I ask password by GUI prompt while using sudo in script?

I use Trisquel GNU/Linux with GNOME Flashback Desktop Environment. I need a GUI password prompt for user for executing command with sudo in script. Example consider following script: zenity ...
53
votes
6answers
5k views

Why does reboot and poweroff require root privileges?

To restart or shut off Linux from the terminal, one can use reboot and poweroff, respectively. However, both of these commands require root privileges. Why is this so? What security risk is posed by ...
1
vote
1answer
19 views

Visudo sanity check for the whole ecosystem of included files?

Is it possible to perform a visudo sanity check for a file in the context of other files included from /etc/sudoers.d? Scenario: I want to add a new file to /etc/sudoers.d the file itself is correct ...
0
votes
0answers
14 views

How to configure Double Commander to ask for my password and use sudo when it needs it?

As a Total Commander lover I am trying to replace it with Double Commander as Midnight Commander doesn't feel enough to me (needless to say standard single-pane file managers don't). One of the ...
2
votes
1answer
44 views

How is sudo interrupted in xterm on Ctrl-C? [duplicate]

Please explain in detail (including tty related stuff) how is a sudo foreground process on a X terminal emulator actually killed on the Ctrl-C. See the following example please: $ sudo -u test_no_pw ...
1
vote
2answers
50 views

Invoking a script with sudo ignores the shebang

Invoking a script using sudo ignores the shebang and runs the script in a different shell. To test, I created a script (test.sh) containing: #/bin/bash echo "BASH is: $BASH" echo "actual shell is: ...
1
vote
2answers
35 views

Add user with root/administrative privileges

quick questions. I'm running lots of Debian boxes (as servers), we don’t install the UI. We would like to setup monitoring Via a SSH connection (monitoring tool establishing an SSH connection to scan ...
1
vote
2answers
31 views

Use rtcwake without entering a password

I would like to execute something like rtcwake -m off -s 60 without entering a password. I used visudo to write the following line into /etc/sudoers: %sudo ALL = NOPASSWD: /sbin/shutdown, ...
1
vote
2answers
70 views

Debian sudo doesn't work

I am new to Debian, I am trying to update software using sudo apt-get Then it says: [sudo] password for thisismyusername: Then I enter my username's password. Then it says: ...
1
vote
1answer
38 views

How to track who added sudo privilege to a user

I have a LDAP user named "ciadmin" created on the Red Hat based system without sudo privlidges. Somehow this user now has sudo privileges and can basically become root on the system. I want to track ...
6
votes
2answers
208 views

sudo (cd /some/dir; ./runscript.sh) fails

So, in bash, this works fine: (cd /some/dir; ./runscript.sh) assuming /some/dir/runscript.sh exists. but sudo (cd /some/dir; ./runscript.sh) fails with the error: -bash: syntax error near ...
1
vote
2answers
39 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
13 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
32 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
38 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
15 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
72 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
48 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
31 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 ...
1
vote
1answer
37 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
68 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
81 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
58 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
35 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
15 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
62 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?
5
votes
1answer
73 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: ...