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)

17
votes
2answers
12k 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 ...
17
votes
1answer
40k views

How do I remove Ubuntu's password requirement? [duplicate]

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 ...
16
votes
1answer
1k views

What does su > echo “<username>” mean?

When I was entering the command su > echo "sachin" it was asking for a password. When I gave my password, some strange things happened as you can see: One more thing: there is another user, ...
16
votes
4answers
271k views

How do I login as root?

I want to login as root, but when I enter sudo -s and enter password, this message is shown: "you are not in sudoers file", and when I enter su and enter password, this is shown: ...
16
votes
5answers
15k views

su command + authentication failure

I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure. So I checked on the internet and then went into recovery mode and ...
16
votes
1answer
12k views

“sudo cd …” one-liner?

Occasionally I want to cd into a directory where my user does not have permission, so I resort to sudo. The obvious command sudo cd somedir doesn't work: $ sudo mkdir test $ sudo chmod go-rxw test $ ...
15
votes
4answers
6k views

What is the functional difference between sudo su and sudo -i?

Why is one preferred over the other in this example? sudo su echo "options iwlwifi 11n_disable=1" >> /etc/modprobe.d/iwlwifi.conf exit Please provide links to Ubuntu documentation.
15
votes
9answers
19k views

How to run an Application as another user?

I use krusader for file management stuff. the problem is that apache's DocumentRoot should be under chown www-data:www-data /path/to/www. so using krusader (which is run under my account) I've not ...
15
votes
2answers
32k 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. ...
15
votes
0answers
15k views

Unable to resolve host [duplicate]

Possible Duplicate: sudo: unable to resolve host (none) When I enter a sudo command in to the terminal I get an error. Just before it asks for a password it says: sudo: unable to ...
14
votes
4answers
1k views

I change the last line in /etc/passwd and I can't use sudo

Here is what I have done: Change a username in the last line: tiny to abc tiny@tty7:~$ sudo vim /etc/passwd Change this: tiny:x:1000:1000:tiny,,,:/home/tiny:/bin/bash to this: ...
14
votes
2answers
3k views

Why do I need root privileges to umount a drive at the command line, but not in nautilus? How to change?

When I insert a thumb drive, media card, or USB hard drive, to unmount it via the command line, I need to use sudo umount /media/the_device But, I can unmount the device in a file manager like ...
14
votes
3answers
1k views

How often is the password asked for sudo commands? Where can I set it up?

I execute quite a lot of sudo commands. I noticed that if I execute one and then another one within few minutes, the 2nd time I don't get the message: [sudo] password for my_username: but I do ...
14
votes
4answers
8k views

Setting TeX Live path for root

I have installed TeX Live 2011 vanilla and I have trouble setting the TeX Live path for root (in Ubuntu 11.10). The problem is that when I run sudo tlmgr I get: sudo: tlmgr: command not found To ...
14
votes
2answers
24k views

Environment variables when run with 'sudo'

As example to my question, my ~/.bashrc file contains this lines: export LD_LIBRARY_PATH=/opt/intel/mkl/lib/ia32:$LD_LIBRARY_PATH export LD_PRELOAD=/opt/intel/mkl/lib/ia32/libmkl_core.so so that ...
14
votes
3answers
7k views

Broken sudo: can't open /etc/sudoers: No such file or directory

I have a live USB persistent version of Ubuntu 11.04 installed with Unetbootin. After some time I experienced some bugs while upgrading the kernel and trying to use my second screen on my laptop. ...
14
votes
1answer
19k views

What exactly does sudo apt-get -f install do?

I have seen it before. I am just wondering what exactly does it do?
14
votes
0answers
16k views

sudo: unable to resolve host (name already added to /etc/hosts) [duplicate]

Whenever I use sudo, I get this: sudo: unable to resolve host dave00-G31M-ES2L Here is my /etc/hosts: dave00@dave00-G31M-ES2L:~$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 dave00-G31M-ES2 # ...
13
votes
6answers
99k 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 ...
13
votes
4answers
8k views

What if I accidently run command “chmod - R” on system directories (/, /etc, …)

I accidently ran sudo chmod 755 -R / instead of sudo chmod 755 -R ./ I stopped it after few seconds, but now there is some problems such as sudo: must be setuid root How can I revert ...
13
votes
6answers
2k views

How could I list all super users?

I want a command to list all users who have root privileges i.e. sudo ? Suppose I'm a sudoer user. How could I know all other sudoer users?
13
votes
1answer
3k 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 ...
13
votes
2answers
3k views

Why am I suddenly not a sudoer anymore? [duplicate]

I booted up Ubuntu 12.10 today, and when trying to sudo, I entered my password as usual but it had said I'm not a sudoer. So I go and check my account under User Accounts, and for some reason Im now a ...
13
votes
2answers
9k views

How do I prevent PolicyKit from asking for a password?

For years, I've had the following in my sudoers file: scott ALL=NOPASSWD: ALL For those who don't know, this prevents sudo and friends (gksudo, etc.) from asking for a password. However, over the ...
13
votes
3answers
29k views

Disable sudo permission to user from command line

I have activated root user in ubuntu and want to use ubuntu as server with no DE. For this I want to disable sudo privilege given to first user. How can I do this from command line ? I know I can use ...
12
votes
1answer
767 views

Is it possible to enter password for sudo only once, and configure it to not require for password on other terminals?

I enter my first sudo command. I enter my password. For a while, I wont have to enter my password for subsequent sudo commands. Now the question. I am someone who opens a lot of terminals. It would ...
12
votes
3answers
30k views

Mount VirtualBox SharedFolder in Ubuntu VM on boot

I have a Ubuntu VM running in VirtualBox. I have a Shared Folder set up as myshare I have a folder created in my home directory (~/jamesw) as host. using the line sudo mount -t vboxsf myshare host ...
12
votes
4answers
37k 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 ...
12
votes
3answers
4k views

How to cancel the currently-applied remaining sudo time-out?

When I've just run sudo, and don't want it to remain active for the normal duration of its time-out, how can I cancel that remaining active time-out? sudo -k kills it for the current terminal ...
12
votes
1answer
23k 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 ...
12
votes
2answers
53k 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 ...
12
votes
1answer
11k views

Cannot lock '/etc/group' in recovery mode

I've currently booted into recovery mode, because I removed my sole user from admin :/ When I run adduser oadams admin, I get gpasswd: cannot lock /etc/group; try again later. For what it's worth, ...
12
votes
5answers
70k views

how to remove symbolic link

i was doing sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin but i accidentally typed something else. So now I want to correct it but it says symbolic link already exist. Please help, Thanks in ...
12
votes
1answer
7k views

Is it possible to give sudo access to only a particular command?

Background: I have a development machine with LAMP setup. Several developers would access the machine from time to time. Every time they make some change in a configuration file they will need to ...
12
votes
5answers
28k views

How can I fix broken sudo - sudo: parse error in /etc/sudoers near line 23?

I am getting this error: sudo: parse error in /etc/sudoers near line 23 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin I was trying to disable password ...
12
votes
3answers
5k views

How to prevent system applications (like the Software Center) from asking for password?

I'd like Software Center, Update Manager and some other system management applications to work without asking for password (like sudo does if configured with NOPASSWD) but only asking for a ...
12
votes
2answers
26k 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 ...
11
votes
6answers
24k views

How to avoid prompt password for sudo?

I know I can go root (super user) via the su command but I have to authorize it after firing the commands. Is there a way I can go root and authorize (with password) in one line
11
votes
2answers
7k views

What does sudo service do?

As far as I know and it seems that other people have the same opinion sudo is a command that executes something with administrative privileges. However when I run rcconf I can see this line: [*] ...
11
votes
2answers
401 views

How come you don't need sudo privileges to update the packages list in the 10.10 Update Manager?

I have noticed that when I press the "Check" button from the Update Manager in Maverick, it starts directly downloading the information on packages without asking me my password (sudo verification) ...
11
votes
1answer
1k views

Why I have to type my password after exiting a sudo -i session?

sudo -i in the terminal will made normal user into root user & after changing into root user if we exit then again we will be back to normal user.If we try again , next time it directly takes me ...
11
votes
2answers
957 views

I broke Sudo after an upgrade from 9 to 12.04.1

Currently sudo will prompt for a password, but absolutely nothing happens after that. No errors of any kind. I've checked the sudoers file, it passed the visudo syntax check, here's the setup: # # ...
10
votes
2answers
30k views

sudo apt-get remove does not remove config files

I'm new to Linux/Ubuntu - and I'm wondering if the behaviour I'm seeing is as designed. I have installed vsftpd: sudo apt-get install vsftpd Then I remove: sudo apt-get remove vsftpd However, ...
10
votes
6answers
4k views

Why can't non-admin users install software?

This is probably something I don't understand since I am used to Windows and am only starting out with Ubuntu. I know that software in linux comes in packages what I don't understand is why can't ...
10
votes
1answer
2k views

How to make 'sudo' grab the password from a file?

I want to run a command that requires the sudo password say: sudo apt-get update Isn't this supposed to work (I have stored the password in a normal text file passwd.txt): sudo apt-get update ...
10
votes
7answers
22k views

How can I run an application with a GUI as admin from a non-admin user session?

I defined 2 user accounts: one with admin privilege (with sudo right) => lets call it adminuser. a 2nd one without any privilege => lets call it normaluser and I configure the autologin on this 2nd ...
10
votes
3answers
636 views

Is there a desktop-neutral gksudo?

There are various tools for various desktops that aim to run a graphical application as root. gksudo, kdesudo, empower, etc... But what if I'm writing a script that could be used on any Linux ...
10
votes
1answer
954 views

Why does sudo ask for a password in window after I've just authenticated in a different one?

If I am using the command line in xterm, gnome-terminal, etc., I can keep sudo from re-prompting for a password, within some limits, or I can disable it. As a compromise between usability and ...
10
votes
2answers
489 views

how to be warned if terminal has sudo privileges and also show how much time is left?

How to see in the terminal that you have sudo privileges? (so knowing I have these privileges, I can just type sudo -k) It would be better to not add too much information into the terminal also, just ...
10
votes
2answers
5k 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 ...