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)

7
votes
1answer
22k views

How do I remove Ubuntu's password requirement?

Here are my circumstances: I am running Ubuntu 12.04. I have one user account. I absolutely hate the password requirement. How do I disable this requirement such that my Linux computer will behave ...
7
votes
2answers
35k views

How to give nopasswd access to multiple commands via sudoers?

Below is what I know: I have to add this below line in sudoers file to give rights to the user for particular task. user_name ALL=NOPASSWD: /usr/bin/apt-get install In this case I want to give ...
7
votes
2answers
16k 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 ...
7
votes
2answers
2k views

warning message at command line `sudo`

Everytime I try to sudo something at the terminal, I get a warning message: alexandre@XPS-15Z $ sudo mount file.iso /mnt/ -o loop [sudo] password for alexandre: no talloc stackframe at ...
7
votes
1answer
692 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 ...
7
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 ...
7
votes
1answer
422 views

For what duration is sudo_root in “don't-prompt-for-password” mode?

The first time a user enters sudo foo, sudo_root prompts for the password. For a certain duration after that, sudo_root doesn't prompt for a password for any subsequent sudo foo's in that terminal ...
7
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 ...
7
votes
2answers
8k 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, ...
7
votes
1answer
254 views

Why superuser don't have global menu integration? [closed]

In Unity, when running an application as a superuser, the menu is in the old-style. It's not integrated in the global menu. Why?
7
votes
1answer
253 views

How disable mysql command in sudoers file?

How can I disable /usr/bin/mysql command in sudoers file? I've tried to use it this way: %tailonly ALL=!/usr/bin/mysql But when I access user 'tailonly' of group 'tailonly', this command is still ...
7
votes
1answer
604 views

Is it safe to run a GUI program as another user?

I need to run a program (libreoffice) as another user. I noticed that the program started in the background when invoked as kdesudo -u otheruser libreoffice, possibly to avoid social engineering ...
7
votes
0answers
10k views

Can I run sudo without entering a password? [duplicate]

Possible Duplicate: How to run an application using sudo without a password? I like Ubuntu, but I hate entering a password every time when I run a command with sudo. Can I avoid it?
6
votes
2answers
4k views

Password not working in Graphical Applications (gksu)? Works with sudo

I am having a problem where when I try to run say GParted, when I am prompted for a password, it says "Incorrect Password" But when I enter the same password using terminal sudo gparted for example, ...
6
votes
4answers
38k 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 ...
6
votes
1answer
13k 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 ...
6
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 ...
6
votes
1answer
427 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 ...
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
6answers
3k 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 ...
6
votes
2answers
1k 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 ...
6
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:~$ ...
6
votes
2answers
271 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
174 views

How do I safely run a graphical application as a normal user while root?

We often talk about using gksu, sudo -i and pkexec to run things as root while a normal user but I'm facing the opposite problem today. The script I'm using is running as root. I need it to start a ...
6
votes
3answers
5k 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
196 views

Lost sudo privileges [duplicate]

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, "** ...
6
votes
2answers
10k views

sudo: unable to resolve host ubuntu-server

I have a problem with sudo. Every time when I trying to use sudo I got this problem: sudo: unable to resolve host ubuntu-server My /etc/hosts file: 127.0.0.1 localhost 127.0.1.1 ...
6
votes
1answer
1k 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
829 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 ...
6
votes
2answers
313 views

Sudo commands are run without entering the root password, how to stop this?

I haven't edited my sudoers, but I don't have to enter the password when running a sudo command line in the terminal. I can run any sudo command without entering the password, how can I stop this ?
5
votes
7answers
2k views

Is the command `sudo rm /Desktop/filename` safe?

Is this safe to use? sudo rm /Desktop/FILENAME The reason for wanting to use sudo is I can't see the file. I accidentally typed in sudo rm /Desktop/index.html. It didn't find it but could ...
5
votes
3answers
820 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
8k 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
25k 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
4answers
93k 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
2answers
6k 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
4answers
11k 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
4answers
8k 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
3answers
485 views

My password can log me in, but nothing else (“user is not in the sudoers file” error when I try)

I recently got a new user account for Ubuntu 12.04 on Linux after becoming unable to log in to one of my earlier accounts. I can log in to this account easily enough, but when I try to use the ...
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
10k 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
3answers
161 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 ...
5
votes
3answers
16k 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
2answers
394 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
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
1answer
2k views

Authentication required to Mount a Device

Today I came across a very strange message when today i double click the drive WHICH HAS NTFS FORMAT it give me this message THAT AUTHENTICATION IS REQUIRED TO MOUNT A DEVICE I know with root user ...
5
votes
1answer
466 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
222 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
2answers
1k views

How do I drop all elevated privileges through the terminal?

I did some authentication mounting where I added code like timestamp_timeout on sudoer. This setting will effect every mounting, where you must enter the user password. After entering the password ...
5
votes
2answers
518 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 ...