sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

1
vote
1answer
232 views

Why `which tmux` and `sudo which tmux` return 2 different values?

ssh bobby@tony:~$ which tmux /usr/bin/tmux ssh bobby@tony:~$ sudo which tmux ...
6
votes
1answer
1k views

how to set the sftp -s subsystem option in a configuration file

The sftp command supports a subsystem option (-s) which allows the remote user to select the remote sftp-server executable, and optionally upgrade to sudo in the process like so; sftp -s ...
3
votes
3answers
271 views

how can I give a normal user write access to a network interface?

I have a program that reads and writes packets to/from network interfaces, and normally I would add myself in the sudoers file and run the program like this: sudo ./bridge But now I need multiple ...
2
votes
1answer
785 views

Ubuntu 11.10 Server: create user, home directory, sudo privileges: command line only

I have a rackspace server and I'm having problems with configuration. I need to lock it down and throw away the key, because right now I can only login with root to do anything substantial. I also am ...
4
votes
2answers
3k views

ulimit PICKLE: “Operation not permitted” and “Command not found”

I'm trying to increase the maximum number of open files for the current user > ulimit -n 1024 I attempt to increase and fail as follows > ulimit -n 4096 bash: ulimit: open files: cannot ...
1
vote
1answer
2k views

Mint 12: synaptic package manager error

Yesterday I had the same issue, I solved it by running sudo synaptic But today I don't know what's happening, if I run gksu synaptic or gksudo synaptic they don't do anything. If I go to root and ...
1
vote
3answers
2k views

permission denied when redirecting sudo sed output [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on I'm trying to install drupal according to the instructions given in this tutorial: ...
6
votes
4answers
2k views

How does Bash path completion work with sudo?

Tab path completion does not work (at least on Ubuntu and AFAIK Arch) with sudo mount <whatever> The iso file I am trying to mount is not in /etc/fstab. If I just type mount <whatever> ...
2
votes
1answer
447 views

Software installation with GUI package installer using sudo permission

I have the sudo permission, and I can install any software using the CLI. But I want to know that whether sudo works with package installers in GUI mode. For example I have a .chm file and I want to ...
3
votes
1answer
304 views

Update manager updated without prompting for a password

As far as I'm aware, I'm supposed to be prompted for a password before anything installs, but just now, I told update manager to install updates, and it proceeded to installing them without prompting ...
11
votes
3answers
3k views

Prompt for sudo password and programmatically elevate privilege in bash script?

I'm currently working on a bash script that installs and sets up various programs on a stock Linux system (currently, Ubuntu). Because it installs programs and copies a number of files to various ...
21
votes
1answer
2k views

How to get root inside of vi? [duplicate]

Possible Duplicate: Becoming root from inside Vim It could happen to anyone. The admin types: vi /etc/resolv.conf as a regulare user. He edits the /etc/resolv.conf file, but when he ...
2
votes
1answer
159 views

How can I adjust this short shell script to fit my needs?

I am attempting to force powertop to run when I log in by using the Startup Applications wizard in Ubuntu. Under the 'Command' entry, I've placed gnome-terminal -x ...
7
votes
3answers
3k views

Copying protected files between servers in one line?

I'd like to copy squid.conf from one server to another. The servers don't talk to each other. I'd like to go through my workstation. Both servers have the file, so it will be overwritten on the ...
2
votes
3answers
2k views

debian not accepting administrative password

I have XFCE Debian on an old PowerPC PowerBook G4. When I go to open Synaptic Package Manager, a window pops up asking for my administrative password. I enter the password I normally use for sudo in ...
35
votes
2answers
2k views

Why do we need to use visudo instead of directly modifying the sudoers file?

I understand that if you want to modify who can use sudo and what they can do with it that you should use visudo. I know I'm not suppose to directly modify the sudoers file myself. What is it that ...
2
votes
1answer
400 views

How to create a sudo user that cannot delete me?

I'm sudoer on a remote linux machine and would like to create another user with the maximum privileges, except the privilege of managing my account. I'm assuming a sudoer can delete or change the ...
1
vote
4answers
3k views

Set Default/Global Gnome Preferences (Gnome 3)

I have recently switched to Gnome 3 from Gnome 2 (and switched to Linux recently before that), and Gnome 3 doesn't give me as many options to change settings via the GUI, and especially not to change ...
3
votes
1answer
266 views

How to use SCSUDO to run scripts with positional parameters?

I am trying to use scsudo to run a number of defined commands to stop and start processes on a UNIX host. The issue I am experiencing is that scsudo does not seem to like the use of positional ...
2
votes
1answer
373 views

Why can I copy files to, but not create files in, this directory? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on I'm trying to create an md5sum for an ISO image created with the Ubuntu Customization Kit tools. The ...
1
vote
0answers
414 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 ...
1
vote
1answer
308 views

How to invoke root privileges from my custom app?

In a GUI-environment, I want to be able to ask the user for the root/sudo password and then execute an app that requires root privileges from within my app. As an example, say I want to run an editor ...
2
votes
1answer
376 views

Specific command sequence with sudo and file permissions

I need to allow a certain user access to these commands: sudo sync echo 3 | sudo tee /proc/sys/vm/drop_caches (This particular developer is doing some DB performance testing and flushing the fs ...
11
votes
6answers
7k views

Is there a way to stop having to write 'sudo' for every little thing in Linux?

I'm a newbie when it comes to Linux. I do most of my development in a Windows environment. That said, I'm going to be doing a fair amount of PHP work shortly, and I'm interested in learning RoR, so ...
-1
votes
3answers
385 views

no root shell freely available sudoers policies

I want to prevent users who need escalated privileges from obtaining any kind of a root shell. However since there are many ways to attain this, and many non root commands ( like those found in ...
0
votes
0answers
295 views

Why do you need sudo for “sudo su root”? [duplicate]

Possible Duplicate: When do su and sudo use different passwords? Why do you need to use sudo su root ? Why won't it work to just use su root?
4
votes
1answer
2k views

sudo -u username -s “cmd arg” returns command not found

I used to execute the command: sudo -u elasticsearch -s "ulimit -Hn" and it was returning the value of ulimit -Hn as seen by user elasticsearch until I tried it on Ubuntu 11.10. There it returns: ...
7
votes
3answers
5k views

Why do some packages use 'make install' while other use 'sudo make install'

I recently installed LAME encoder on my server to convert wav to mp3 and that worked with './configure, make, make install; I then tried to install OGG encoder and that requires './configure, make, ...
4
votes
3answers
9k views

Bash Sudo Command Not Found

I have set up a VM using turnkey linux redmine and I'm trying to SSH into the server to install some more items. It doesn't appear to be recognizing the sudo command. Every time I try to sudo ...
7
votes
2answers
4k views

Why is sudo telling me my password is wrong?

I recently installed OpenBSD 4.9 in my computer, so I could learn a little bit about Unix-like operating systems. I added a new user to the system called bruno. Ok. When I use the 'sudo' command, it ...
1
vote
1answer
1k views

pass 1 environment variable using sudo

Is this a correct way for passing an environment variable in sudo ? sudo -u www-data -b env FOOBAR="foobar" /home/user/folder/daemon
0
votes
2answers
1k views

Run in root shell from within a user bash script

I have a script that , among other things, needs to do some stuff as root, like creating a mount folder. I tried: echo "Linux user password is needed in order to ..." sudo -s # also tried: # sudo su ...
3
votes
4answers
950 views

Detach a daemon using sudo?

I noticed that sudo continues to run after executing any of the following lines. Is there any way to detach the daemon completely so sudo does not continue running? sudo -u user daemon & sudo -u ...
7
votes
1answer
5k views

How to run a GUI program as a different user (Debian)?

Using a terminal, I can change the running user with su and sudo — but how can I do that by clicking on an icon/shortcut on the desktop/start menu? If I have to be root to execute I will be asked ...
1
vote
6answers
303 views

Minimize need for sudo

Very often I need to use the sudo command because the command I'm running needs higher privileges. Is there some method to minimize the usage of sudo and/or a way to use it that's faster than typing ...
2
votes
3answers
4k views

Difference between “make install” and “sudo make install”

Sometimes I encounter problems with using make install which gives me a permission denied error when writing to some folders. So instinctively I use sudo make install. Will this introduce additional ...
9
votes
3answers
8k views

Does mount always require root privileges?

I was under the impression that any sort of call to mount requires root privileges. But recently I was told "You should instead create appropriate entries in /etc/fstab so that the filesystems can be ...
2
votes
1answer
497 views

Default fedora 15 install, how do you get a network drive to mount after login?

I am running a default fedora 15 install. My goal is to have a couple of network drives get mounted right after the user logs in graphically (not via ssh). The script I want to execute is basically ...
1
vote
0answers
62 views

What is the difference between these two sudoers lines? [duplicate]

Possible Duplicate: What is the proper sudoers syntax to add a user? What is the difference between these two lines of /etc/sudoers: USERNAME ALL=NOPASSWD:ALL USERNAME ALL=(ALL) ...
4
votes
1answer
9k views

How do you get NOPASSWD sudo option to work in Fedora 15? [duplicate]

Possible Duplicate: How to run a specific program as root without a password prompt? I installed fedora 15. I use sudo visudo to modify sudoers file and add the following line: USERNAME ...
4
votes
2answers
359 views

Should I be using 'sudo' in scripts that I write?

I'm setting up a new machine (well actually, an Ubuntu VM) and am trying to write a script to setup a few common things that I use when doing this (Git, curl, vim + janus). So my script looks a bit ...
2
votes
4answers
568 views

sudo without password - security? [duplicate]

Possible Duplicate: What specific vulnerabilities am I creating by disabling the sudo password? I'm involved yet again in the old argument on whether sudo without password is secure enough ...
2
votes
2answers
1k views

When running sudo make install environment variables are not passed

I have problems with using pkg-config in a Makefile, while running in sudo mode. I need to have PKG_CONFIG_PATH set for pkg-config to find geany.pc file that is held in /usr/local/lib/pkgconfig. If I ...
6
votes
1answer
3k views

Why can't sudo redirect stdout to /etc/file, but sudo 'nano' or 'cp' can?

Why does redirection, using sudo give me an error for the following commands? $ sudo printf "foo" >/etc/file bash: /etc/file: Permission denied $ sudo printf "foo" ~/file; cat ~file ...
2
votes
4answers
322 views

sudo to remember password for list of commands?

Is there a way in Linux to make sudo command to remember the password the user entered for in the first of the lines? For example, for a list of commands that the user has to enter, the some of then ...
4
votes
2answers
706 views

Run Python Portio script as normal user without root access

I know there are risks running a root script as a normal user, but in this case I don't have a choice and what I am doing is machine related. I have an Small Board Computer that has GPIO ports and I ...
11
votes
2answers
4k views

What is the proper sudoers syntax to add a user?

According to the comments in /etc/sudoers (Fedora 13): ## Syntax: ## ## user MACHINE=COMMANDS ## ## The COMMANDS section may have other options added to it. My two related questions: What ...
21
votes
6answers
24k views

How to run a specific program as root without a password prompt?

I need to run something as sudo without a password, so I used visudo and added this to my sudoers file: MYUSERNAME ALL = NOPASSWD: /path/to/my/program Then I tried it out: $ sudo ...
1
vote
1answer
2k views

Are there any better/safer methods to launch the OpenVPN client as a normal user?

I'm trying to connect to an OpenVPN server. It works perfectly when I use root to give out the commands to connect: openvpn /etc/openvpn/client.conf but with a normal user I get this error messages ...
5
votes
4answers
2k views

Allow users to run only specific binaries with root permissions/privileges

I would like to allow a specific user to be able to sudo /sbin/iptables only. I have a bash script which configures iptables. The problem is that configuring /sbin/iptables as sudoable is not enough ...