Questions related to the sudo command that allows users to run programs with the privileges of a different user (normally the root user).

learn more… | top users | synonyms (1)

6
votes
2answers
14k views

No password prompt at sudo command

Whenever I issue command sudo apt-get install ** it does not ask for password, not in my admin user too. How to make it prompt for password? My sudoer : ubuntu:~$ sudo cat /etc/sudoers # # This ...
6
votes
3answers
3k views

How to run a Desktop graphical application just once under sudo?

For example, I'm trying to run Archive Manager from Ubuntu Desktop (10.04) under sudo otherwise it won't let me extract a Software Development Kit into /usr/local Update: I don't want sudo to be a ...
6
votes
1answer
990 views

How to configure pkexec?

Reading these questions and answers: When to use pkexec vs. gksu/gksudo? Why is gksu no longer installed by default? brought me another one that will create problems for new users of that ...
6
votes
5answers
2k views

Change sudo timeout under fish

I want to change sudo timeout, so I edit sudoers via visudo (as adviced in many tutorials online) to the following form: Defaults env_reset , timestamp_timeout=20 root ALL=(ALL:ALL) ALL %admin ...
6
votes
1answer
5k views

How to run a command as a user whose login is disabled?

I am trying to use the su command to run an application as another user In this case I am trying to run irssi blah@ubuntu: su - [username] irssi (enter password) blah@ubuntu: (nothing happens) ...
6
votes
2answers
255 views

To be granted root rights while browsing files/directories with Nautilus 2.30

I'd like to know if there a way to be granted root rights while using Nautilus 2.30 ? For example I'd like to move some old folders of long unused users from the home directory - remains of previous ...
6
votes
1answer
2k views

How to use a python virtualenv with sudo?

I am trying to make a python environment separate from the system one (using virtualenv) in a directory which is not under /home, because I need to use it to build other software that has to be ...
6
votes
2answers
7k views

Root's .bashrc not executing on sudo -i

On one of my Ubuntu 11.10 servers, when I use sudo -i to become the root user, root's .bashrc is not being executed. On all other servers, whose relevant configurations are identical as far as I know, ...
6
votes
3answers
143 views

How to do a sudo verification that lasts long enough for (unprivileged) make to finish?

I often use the following construct for building and installing a tarball: sudo -v && make && sudo make install which will allow me to enter my password immediately and have ...
6
votes
3answers
4k views

Run script as root at login (no sudoer user, shell session)

Much like /etc/profile and ~/.profile but ran by root instead of the user is doing login. /etc/rc.local runs after boot but I need running the script before login. The user is not a sudoer one. ...
6
votes
1answer
973 views

Opening terminal asks for sudo password

Whenever I open a new terminal within 12.04, I am prompted to enter my sudo password. Why is this happening?
6
votes
2answers
698 views

How do I work around sudo 'segmentation fault' on basic bash commands?

I am sure the answers are out there, but alas there are too many answers (here and elsewhere) to other questions stopping me from finding them. I just encountered something substantially similar to ...
5
votes
6answers
39k views

How can I permanently grant root access to a user? [duplicate]

Possible Duplicate: How do I grant sudo privileges to an existing user? I've been searching for the answer to this but all I find is "It's not a good idea" or "We don't recommend it" and ...
5
votes
3answers
783 views

Why is this by passing the SUDO password?

I have a bash script I am using to automate a SVN checkout. The contents of the file were: #!/bin/bash cd /var/www-cake sudo svn checkout file:///usr/local/svn/bash_repo/repo/ Then when I double ...
5
votes
1answer
7k views

how to shutdown a linux machine, including the root password, in 1 line?

How do you include the root password, say for shutting down an ubuntu machine? like, sudo shutdown now is it possible to include the password on this 1 line? like an extra parameter? reason for ...
5
votes
4answers
77k views

how to use sudo command to install .tar.gz? [duplicate]

Possible Duplicate: How to install a .tar.gz (or .tar.bz2) file? I am newbie to ubuntu. I would like someone to explain how to use sudo command to unzip & install .tar.gz file to me.
5
votes
4answers
21k views

sudo: source: command not found

I've been updating some of the default profile for bash, and saw from the tutorials I was following that I could reload the new profile with the new environment settings by using: source ...
5
votes
2answers
4k views

Regain Sudo rights after removing from admin group [duplicate]

I accidentally removed myself from the admin group when editing the user. Now I can no longer use sudo. The error says: ber is not in the sudoers file. This incident will be reported. I booted up ...
5
votes
2answers
4k views

What's the difference between 'sudo [command]' and 'sudo sh [command]?

I'm trying to install VMware Workstation in my Ubuntu 12.04.2 LTS. If I execute the following command: sudo ./VMware-Workstation-9.0.1-894247.x86_64.bundle it finishes at once and the installation ...
5
votes
1answer
186 views

How to configure pkexec to not ask for password?

I have a GUI application that needs to call a daemon (written in Python) with superuser privileges. I would like to do this without prompting the user for a password. Since the daemon is a script, I ...
5
votes
1answer
468 views

How to check if sudo password has been entered for this terminal session?

As said in the headline, I need to check if the sudo password has been entered for this terminal session in a shell (aka, if I have sudo rights now). If I have it, I would like to do one thing and if ...
5
votes
4answers
7k views

How to give shutdown privileges to a user?

I am using Ubuntu 11.04. I want to run a script which checks for a running process and shuts down the system when that process ends. To do this, the user requires shutdown access so that the script ...
5
votes
5answers
2k views

Disabling shutdown command for all users, even root - consequences?

I would like to disable the shutdown command for all users, even root, on an Ubuntu Server installation. The reason I want to do this is to ensure that I don't get into the habit of shutting down the ...
5
votes
2answers
946 views

How can I ensure the `snd-hda-intel` module is loaded on startup?

I need to type sudo modprobe snd-hda-intel in order to get my sound card to work. What config file do I need to edit and what edit should I be looking to make so I can get the sound driver loading ...
5
votes
5answers
8k views

How do I fix a “E: The method driver /usr/lib/apt/methods/http could not be found.” error?

I tried updating my packages from the terminal and this is what I got: $ sudo apt-get update E: The method driver /usr/lib/apt/methods/http could not be found. E: The method driver ...
5
votes
1answer
7k views

difference between gksudo and sudo? [duplicate]

Possible Duplicate: What is the difference between “gksudo nautilus” and “sudo nautilus”? I have tiny script that I want it to run on start-up, but it needs sudo ...
5
votes
1answer
5k views

Errors followed by command “Sudo nautilus”

I have opened Nautilus with root power to delete some items.When I typed Sudo nautilus,the particular window opened up,but some errors also came along with it as following: meego@meego-Notebook-PC:~$ ...
5
votes
1answer
1k views

“Permission denied” error when editing /etc/ld.so.conf

When I run this command it fails: sudo echo '/usr/local/lib' >> /etc/ld.so.conf bash: /etc/ld.so.conf: Permission denied I don't have any problem running sudo for other tasks. I am using ...
5
votes
2answers
7k views

How do I become a “superuser”?

The following command fails with an error: $ dpkg -i libmotif*i386.deb dpkg: error: requested operation requires superuser privilege How do I become a superuser? I thought I was the superuser?
5
votes
2answers
348 views

How to prevent users from installing non-free software?

Is it possible to disable installation of non-free or proprietary softwares and applications in Ubuntu?
5
votes
2answers
13k views

Setting the PATH so it applies to all users, including root/sudo

The instructions in How do I set PATH variables for all users on a server? work to set the PATH for all 'normal' users. However, if I do sudo -s and then printenv PATH the updated path is not shown. ...
5
votes
2answers
1k views

Can't perform regular sudo commands, have to use su now

I'm an ubuntu newbie I just installed 10.10 and I don't know what I did but now to perform actions that required sudo privileges (open synaptic, mount device, run apt-get install, etc) the OS won't ...
5
votes
3answers
14k views

Password not working for sudo (“Authentication failure”)

Before I mention anything further, DO NOT give me a response saying that terminal won't show password input. I'm AWARE of that. I'm typing my user password in (not a capslock issue), and for some ...
5
votes
1answer
308 views

Error when trying to run an app with sudo or gksudo

I'm not sure what happened. A few days ago I installed some updates and now i get an error whenever I try to run sudo nautilus. If I run gksudo nautilus it hangs for a few seconds then does nothing. ...
5
votes
1answer
202 views

How do I allow a group (except one user in that group) to use sudo without a password?

How do I allow an entire group, except a certain user in that group, to use sudo without providing password?
5
votes
1answer
168 views

Lost sudo privileges

Last night I was working on installing vsftpd on my Ubuntu 12.10 server. I shutdown last night and when I booted up this morning I seemed to have lost the abilities to sudo anything. It just says, "** ...
5
votes
2answers
509 views

How does the shutdown button works without asking for password? [duplicate]

Possible Duplicate: How to shutdown/restart/suspend … without authentication or confirmation? If shutdown asks for password (and so does every program which has the option to turn ...
4
votes
2answers
6k views

Run apt-get without sudo

This might be a very naive question, but I wanted to know how I could give multiple users access to a single computer without making them root users. How would I give them limitted sudo access such ...
4
votes
2answers
136 views

I have 2 different GEdits?

When I load GEdit, it is different from sudo GEdit. Normal GEdit gives me Gtk warnings in the console, and ithas a different look. When I install plugins on either version, it doesn't reflect on the ...
4
votes
3answers
11k views

Mounting filesystem with special user id set

I want to mount the device /dev/sda3 to the directory /foo/bar/baz. After mounting the directory should have the uid of user johndoe. So I did: sudo -u johndoe mkdir /foo/bar/baz stat -c %U ...
4
votes
4answers
30k views

'Some index files failed to download' while updating

When running sudo apt-get update I get these following errors: Err archive.ubuntu.com quantal InRelease Err archive.ubuntu.com quantal-updates InRelease Err archive.ubuntu.com quantal-backports ...
4
votes
4answers
11k views

Sudo doesn't work

I edited my sudoers file in /etc and after that I can't use sudo anymore. I get this whenever I issue the command: sudo: >>> /etc/sudoers: syntax error near line 30 <<< sudo: parse ...
4
votes
1answer
4k views

Cannot echo “hello” > x.txt even with sudo? [duplicate]

Possible Duplicate: sudo & redirect output I'm trying to create a file in /var/www, but even with sudo this fails: user@debVirtual:/var/www$ sudo echo "hello" > f.txt -bash: f.txt: ...
4
votes
2answers
286 views

How do I make a sudo command start at start-up with a 1 minute delay?

I would like to make a sudo command (sudo service smbd restart) run after 1 minute of being logged on. How would I go about doing this? P.S. This is a system with no monitor, mouse, keyboard or ...
4
votes
5answers
4k views

Always Sudo Privileges

I've searched for this, and the answer is probably in a million places on the 'net, but I can't find it... How do you give your account root privileges in Linux so that you don't need to sudo every ...
4
votes
4answers
6k views

How do i transfer files over ssh after sudo?

I have access to a box over ssh and there are some files i'd like to transfer to another machine, but those are only accessible under another account so if i ssh with 1, then sudo 2 i can browse them ...
4
votes
2answers
526 views

Nautilus automatically browses as root

I used gksudo nautilus (not through the terminal but through the 'Open With' command) for some copy & paste stuff that requires root access. But now whenever I open the file browser (Nautilus) to ...
4
votes
3answers
218 views

Will this sudo rule allow a user to update the system and nothing more?

I want to design a sudo rule that will allow the user ricardo to update the system using aptitude, but prevent him from using sudo to run any other command (he's a problem user). Are there any ...
4
votes
2answers
4k views

Why does sudo not add root's PATH with Ubuntu 12.04?

I've recently upgraded my server to Ubuntu Server 12.04. Previously it was running 11.04. Ever since then I've been having trouble carrying out root user commands through sudo. An example of this ...
4
votes
2answers
1k views

Standards accounts are able to get root access using sudo without password request

I have installed a particular software using the installer present using the command sudo ./install.sh. After the installation now all the accounts on my ubuntu laptop can gain root access by ...