sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

3
votes
1answer
48 views

Run command with sudo by default

Just one brick missing in my current wall. Feels to me like it should be easy to solve, nevertheless I got some explaining for you to do to make you understand what I want to achieve. I need a linux ...
3
votes
1answer
171 views

Some software runs only by root terminal

I'm facing this odd situation here, programs such as gparted, furiusisomount and Rstudio never run by clicking on their icons in the applications menu or by running them with terminal as a normal ...
2
votes
1answer
48 views

Allow a specific user to sudo to users that are part of group X

I have several users, which are all part of group X. And I want to be able to give user Y to sudo to members of group X. Obviously I don't want to edit sudoers everytime I add a user to group X, is ...
1
vote
1answer
191 views

Allow AD Groups to SUDO

I'm adding some Fedora 20 workstations to our Windows 2003 domain. I've successfully joined the domain with the boxes, and can login with domain accounts. Now I'm trying to allow the default AD group ...
1
vote
1answer
31 views

How do I switch user without any references to the old one?

A while back, when playing with unprivileged LXC, I discovered that the command to create a container failed if I used su to switch to the user, but it worked if I used ssh user@localhost to login. ...
1
vote
1answer
66 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
1answer
119 views

Program acting differently depending on user

I am trying to control an RC transmitter from a PHP site. The command works fine as user "xbian" in the command line: sudo /home/xbian/433Utils/RPi_utils/codesend 34832404 for example, and it works ...
1
vote
1answer
805 views

How do I change file/directory permission of a nfs mounted directory, so I access files as user?

On a Ubuntu computer I mounted a directory from another computer using the following line in the fstab: 12.34.56.78:/space/Images /mnt/space/images nfs rsize=16384,wsize=16384,rw,auto,nolock 0 0 ...
0
votes
1answer
9 views

sudo rule with placeholder

i want to allow the use of /usr/sbin/ufw for a special user. But only for a given command: in my /etc/sudoers file i have now (for blocking IPv4 addresses): blockuser ALL=NOPASSWD: /usr/sbin/ufw ...
0
votes
1answer
48 views

How root can make sure that this time sudo will not prompt for password a specific user?

I am writing a script, that will setup lxc on the host, and then configure a container. I want this script to be unattended. After the container is created and run, there is a moment, when I want to ...
0
votes
1answer
97 views

Can't simulate initial login using sudo

$ sudo -iu cyrus sudo: unable to change directory to /srv/cyrus: Permission denied sudo: unable to execute /bin/zsh: Permission denied I don't understand why I would get permission denied for ...
0
votes
1answer
98 views

Process substitution over ssh with sudo in Bash shell

What is the proper way to do something like this: diff <( ssh -t myuser@hosta 'sudo httpd -M') <(httpd -M) When I want to compare the output of the 2 commands, the first on a remote host the ...
0
votes
1answer
526 views

Webmin administrative panel options are missing

When I log into Webmin, with the Ubuntu administrative user frank, I cannot see most of the administrative options: frank is shown as the Administration username in Webmin. I accidentally ...
0
votes
1answer
153 views

Execute remote programs and completely detaching it

I need to execute a remote application (named ConnectionManager), which uses the ncurses library, on the remote server launching it from a local pc. ConnectionManager is a program wich use ncurses ...
4
votes
0answers
237 views

bash does not autocomplete my command when using sudo?

I'm using SaltStack. I would like to auto-complete the minion name when calling salt command. The following line has been added into ~/.bashrc: complete -o default -o nospace -W "$(sudo ls -1 ...
3
votes
0answers
30 views

How to disable sudo related logging for successful command execution under CentOS/Fedora?

You can disable sudo related log messages via adding something like Defaults:juser !syslog to our sudoers file. That is disabling logging to syslog. But under e.g. CentOS/Fedora there is an auditd ...
2
votes
0answers
302 views

Reading from /etc/environment with sudo

Using Ubuntu 14.04 LTS, I'm having a problem trying to read environment variables from /etc/environment when using sudo env. Basically, they are not being displayed. When I do just env, these ...
2
votes
0answers
27 views

Why does xdg-open text_file differ from sudo -u me xdg-open text_file?

If I run the following command, the text file opens in my preferred editor (kate). $ xdg-open text_file However, if I try the following, where sparhawk is my username, I get several warnings, and ...
2
votes
0answers
84 views

PHP exec and amixer

I'm trying to make php lower the dB level of amixer using exec, but it seems like php isn't able to perform the task which requires sudo-access. What should be the best way to solve this? I tried: ...
2
votes
0answers
141 views

Why sudo won't remember my password?

I use sudo in many systems, but I have one of them that makes me type my password each time I run sudo. All the others remember it for a while. This is debian 7.4 wheezy and sudo 1.8.5 I found this : ...
2
votes
0answers
120 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
0answers
1k views

How to run ssh -t user@remote 'sudo nohup bash -c “comand”' in background

I want to run a script on a remote host with sudo privilege, someone suggests that I should use nohup and ssh -t, like the following command: The script ls; sleep 10; echo finish is crafted here to ...
2
votes
0answers
165 views

/proc/net/wireless does not show values unless run as root

cat /proc/net/wireless does not show statistics for wireless devices unless it is run as root, even though the permissions on the file are 444. The same seems to apply when accessing statistics via ...
2
votes
0answers
671 views

Sudo yum permission denied Fedora 17

On Fedora 13, in /etc/sudoers I used to have a line: Cmnd_Alias SOFTWARE=/usr/bin/yum and then for a user that would have the privilege of installing his/her own RPM packages, an entry like: ...
2
votes
0answers
435 views

How to enable `sudo` with custom functions?

Recently I learned you can enable sudo for custom aliases as follows: alias sudo='sudo ' # note: the space is required! The reason this works is the following: If the last character of the ...
2
votes
0answers
836 views

Security of xhost (local) and sudo xauthority forwarding

Context: launch a GUI application as a linux service. I considered making a headless daemon with a GUI front-end but there is too much code involved to do it now. This service must start on user ...
2
votes
0answers
246 views

gksudo not caching credentials

I've built a shell script for mounting ISO images in Nautilus, and it worked fine in earlier versions of Ubuntu. One of the many problems encountered in 11.04 is that gksudo doesn't seem to cache the ...
1
vote
0answers
19 views

gksudo not honoring configuration in /etc/sudoers

Some time ago I posted a question which was related to whether it is possible to preserve environment variables when sudoing to a different user. As it turned out, this is indeed possible. When ...
1
vote
0answers
67 views

sudo and sssd not working with user groups

Having a problem getting sudo that is integrated with sssd to work correctly when we use ldap to store the groups that have the different sudo privs. This works just fine if we have sudo set to go to ...
1
vote
0answers
29 views

Is it safe to disable password for a user, if it only uses SSH key login?

We want to remove the password usage on a UNIX system. The users should only log in with SSH key. Not password. So their password field in the /etc/shadow file will be "*" and set their password to ...
1
vote
0answers
83 views

gksu -S ask for password only once even when set to three times in sudo configuration

I have a problem with gksu command. It always ask for password only once even when I set Defaults passwd_tries=3 in /etc/sudoers file. Command: $ gksu -S --debug ls No ask_pass set, using default! ...
1
vote
0answers
209 views

sudo -u git clone

I'm on Ubuntu server 14.04. I am using apache web server which runs as the www-data. I need to do git clone from a script (a web hook). This script will run with www-data user privilages. Running ...
1
vote
0answers
59 views

What is the correct way to abort an operation from the sudo password prompt?

Sometimes it amazes me the "little" things I don't know about Unix. For years now I have occasionally noted that I don't actually know how to deal with the sudo password prompt cleanly. Every once in ...
1
vote
0answers
2k views

Trying to kill cron job processes found by “ps ax | grep keyword” logged in as pi user

I'm trying to kill several processes from the command line logged into the pi as the user pi. All of the processes have been started by cronjobs, so they should belong to the root user. I'm running ...
1
vote
0answers
55 views

Is there a QT4 equivalent of gksu, not dependent on KDE libraries?

Is there a QT4 application with the same functionality as sudo to gksu that does not require an entire KDE desktop to be installed?
1
vote
0answers
71 views

can't access account with empty password

I used the passwd command to remove the password for my account. Now, when I try to use su to log in to my account, it won't let me enter an empty password. So now, I can't access my account. Any ...
1
vote
0answers
141 views

External HDD read/write permission changing from a cron job

So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
1
vote
0answers
507 views

git deploy using sudo nopasswd

I'm trying to write simple post-recieve script, which would switch to webserver user and pull git repository. To do so, I added git user to sudoers (I've added this to very last line): git ALL = ...
1
vote
0answers
309 views

Bodhi Issue with Nautilus as SU

I am unsure how to run Nautilus with superuser privilieges on Bodhi, or if this is just a bad idea altogether. I am looking for a file manager that can browse my local network, and can be run as ...
1
vote
0answers
517 views

gkSudo Error no matter what I do

I don't know why, It wasn't happening yesterday. Was it because I turned the machine off and back on again this morning? Anyway here's the error. GkSudo won't run anything at all now. (gksudo:3262): ...
1
vote
0answers
679 views

Gnome update-notifier doesn't show updates when user not in sudo group (Debian Squeeze)

Gnome desktop notifications of new updates is not working on my system. I noticed that the notifications stopped working when I removed my desktop user from the sudo group (I prefer to have a separate ...
1
vote
0answers
521 views

Can't make a copy of /var/lib/mysql/ibdata1

I have a RedHat Linux server and I'm trying to make a copy of /var/lib/mysql/ibdata1, but I'm receiving an error saying permission denied and the file cannot be opened. I'm logged in as root user and ...
0
votes
0answers
4 views

forward function and variables into sudo su - <user> <<EOF

my question is simple but I'm not possible to find out solution. I have declared function and variable in bash/ksh and I need forward them into sudo su - << EOF: #!/bin/bash lof_f() { echo ...
0
votes
0answers
25 views

How to grant sudo permission for a .py script on a apache folder?

I've exemplo.py in an folder /opt/lampp/htdocs/cgi-local/exemplo.py folder. The script creates a socket that needs super user permissions. My question was a little confusing? I need to access ...
0
votes
0answers
104 views

Debian wheezy using gnome classic requires root for system modifying changes

I am using Gnome classic on Debian Wheezy, and I sometimes get a popup for package updates. The UI prompts for a root password, and will only accept root. Is there some way for me to add my account to ...
0
votes
0answers
63 views

Installer tries to run sudo for root access

I downloaded Mac4lin from http://sourceforge.net/projects/mac4lin/ I proceeded by following steps 1.Extracted ZIP file. 2. ./Mac4Lin_Install_v1.0.sh it producing following output [Admin@localhost ...
0
votes
0answers
157 views

running a command as a less privileged user: `sudo -u` vs `su` being run as root

in an startup-script that is typically being run as user root, i would like to start a program (actually, a server) as a less-privileged user. the script originally used su -s /bin/sh -c ...
0
votes
0answers
82 views

How to start a GUI program in a VM with PHP

I have an Ubuntu 12.04 VM running on my online server where there is no display attached. I want to start Teamviewer there on that VM to get graphical access to that server. I guess I have to give ...
0
votes
0answers
523 views

Segmentation fault while doing `sudo su -`

I am getting a segmentation fault error while doing sudo su - or sudo su - username in Linux Server (RHEL 4.7). Can any one help me resolve this issue? Linux server (RHEL 4.7) is a LDAP client.
-1
votes
0answers
37 views

How to run the script that requires root acccess as a regular user without adding that user to sudoers?

I have an account with root privileges and need to run the install script for a specific user. I don't want/can't analyse the script upfront to figure out the list of all other packages it is going to ...