sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

2
votes
2answers
37 views

How can I run setfacl -m group:group2:rwx /dev/video0 /dev/snd/* on login?

Q: How do I grant permissions to /dev/video* and /dev/snd/* to a second user, user2 when logged in interactively as user1? I have written a wrapper for sudo that clones the XAuthority settings, and ...
2
votes
2answers
379 views

How can I keep *all* environment vars for a specific command in sudo?

I have a script that sets several environment variables and then finally calls another script using sudo. The script run with sudo must be able to pick up those variables, and I'm not always going to ...
1
vote
2answers
18 views

Grant account permission to check service status

I've created a new account svchk and via visudo granted it permission to run the following command /sbin/service postfix status: Cmnd_Alias POSTFIXCMDS = /sbin/service postfix status svchk ALL = ...
1
vote
2answers
225 views

Using sudoers to allow php to run command

I am trying to get my php page to run this command: shell_exec("sudo /home/xbian/433Utils/RPi_utils/codesend {$num}"); So I added this entry to my sudoers file with visudo: www-data ALL=NOPASSWD: ...
1
vote
2answers
78 views

Script to su -c into a screen is not working as intended

I'm working on a script that will allow me to load up a screen from a user via sudo and su -c. However, when I use it, it will just show the shell of the user: sudo su -c "script /dev/null; screen -r ...
0
votes
2answers
112 views

How can I run a linux build on an NTFS drive?

I'm running under Ubuntu but using a shared drive which is NTFS formatted. I've got blender sitting in a folder (it's the 2.66RC build with some trivial python customisations.) I'm calling blender ...
4
votes
1answer
32 views

Require private key for sudo

For added security, I would like to require a private key to use sudo on my Ubuntu Server box. I've added private key authentication for sudo as described at ...
2
votes
1answer
44 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
36 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
52 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
142 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
77 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
282 views

Launch application as root user in GNOME

I've got CentOS 6 installed on my server. A few users want to have access to it via VNC, so I installed GNOME separately. Everything works okay, but I want to have possibility to run applications as ...
0
votes
1answer
171 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
123 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 ...
3
votes
0answers
73 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
0answers
55 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
924 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
134 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
475 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
360 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
739 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
226 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
20 views

Copy a local file to a remote server, non-root privileges over sudo?

I'd like to do something like: scp local_file remote_server:/some_directory But in order to gain privileges to /some_directory, we need to call sudo. I know that a similar question had already been ...
1
vote
0answers
49 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
18 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
53 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
121 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
306 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
249 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
367 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
510 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
416 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
19 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
47 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
95 views

CentOS custom livecd using su throws: “Error setting value: Failed to contact configuration server…”

I am building my own custom CentOS Live CD with tools and settings I need. But if I want to root myself using "su" I always get this error message: Error setting value: Failed to contact ...
0
votes
0answers
65 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
345 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.