sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

-1
votes
1answer
60 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
40 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
89 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
132 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
58 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
116 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
267 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
60 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
40 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
33 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
40 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
197 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
264 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
30 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
418 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 --...
58
votes
6answers
5k views

Why does reboot and poweroff require root privileges? [duplicate]

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
38 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
62 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
124 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
118 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
71 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
150 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, /sbin/...
1
vote
2answers
241 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
49 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
231 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
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
130 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
67 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
1answer
102 views

Running SSH command from PHP gives sudo: no tty present and no askpass program specified error even though NOPASSWD settings are done

I am using LAMPP to run apache server. From a php file I am executing a python script which executes ssh, scp commands. But I am getting error: sudo: no tty present and no askpass program specified ...
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
96 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
66 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
144 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
60 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
88 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
475 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
64 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
187 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
320 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
178 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
87 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
229 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
95 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
90 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
74 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
230 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
320 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 ...