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)

15
votes
3answers
45k views

How to configure ADB access for Android devices?

I'm using Ubuntu 12.10 and I have installed Android SDK, set it's path in my user .bashrc and it works. The problem is that my phone requires adb to be ran by root for permissions, but running adb ...
15
votes
3answers
44k views

How do I add myself into the sudoers group? [duplicate]

Possible Duplicate: How do I add a user to the “sudo” group? I've added myself back into the admin's group I think, by following this. But I still can't do commands like: sudo aptitude ...
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
4k 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.
14
votes
3answers
6k 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
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
4answers
5k 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
2answers
2k 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 ...
13
votes
3answers
3k views

Remove note about sudo that appears when opening the terminal

Whenever I open the terminal, To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. appears before the terminal. How do I get that to go ...
13
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 ...
13
votes
2answers
2k 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 ...
12
votes
4answers
7k 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 ...
12
votes
1answer
28k 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 ...
12
votes
4answers
191k 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: ...
12
votes
3answers
3k 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
16k views

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

I have seen it before. I am just wondering what exactly does it do?
12
votes
2answers
8k 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 ...
11
votes
2answers
395 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
3answers
25k 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 ...
11
votes
2answers
67k views

Sudoers file, enable NOPASSWD for user, all commands

Preface This is a fairly complex question related to the Sudoers file and the sudo command in general. NOTE: I have made these changes on a dedicated machine running Ubuntu Desktop 13.04, that I use ...
11
votes
2answers
18k 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 ...
11
votes
2answers
22k 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. ...
11
votes
3answers
23k 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 ...
11
votes
2answers
815 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
6k 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: [*] ...
10
votes
6answers
3k 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
7answers
15k 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
1answer
2k 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 ...
10
votes
3answers
455 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
9k 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, ...
10
votes
1answer
5k 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 ...
10
votes
1answer
855 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
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 ...
10
votes
2answers
435 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
4answers
20k 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 ...
9
votes
3answers
2k views

Difference between cat and sudo cat? [duplicate]

Can you tell me what the difference is between cat and sudo cat? All I know so far is that cat is used for displaying contents of file and concatenation.
9
votes
4answers
2k views

Why does echoing these parameters with sudo not work? [duplicate]

Possible Duplicate: sudo & redirect output These are suggestions given by powertop to save energy: echo 1500 > /proc/sys/vm/dirty_writeback_centisecs echo 1 > ...
9
votes
1answer
776 views

How could I have dropped out of sudoers? [duplicate]

I started to receive a message dims is not in the sudoers file. This incident will be reported. about myself. How could this happen? The suspicious command I made was creating group "advanced" ...
9
votes
1answer
1k 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 ...
9
votes
3answers
16k views

Error after sudo-ing “sudo: must be setuid root”

On a colleagues computer, everytime I use a sudo command, I get this error: sudo: must be setuid root I tried various things mentioned on the internet, like changing the permissions to 4755 from a ...
9
votes
3answers
8k views

How do I run eclipse as sudo

I've read that it's bad to run gui applications from a terminal using sudo. In order to administer some eclipse updates, I need elevated privileges (view screenshot). How do I do this correctly?
9
votes
1answer
6k views

rm: cannot remove `/run/user/root/gvfs': Is a directory

Whenever I type a command which is similar to sudo apt-get install or anything like this I get this kind of error: $ sudo su # exit exit rm: cannot remove `/run/user/root/gvfs': Is a directory How ...
8
votes
6answers
69k 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 ...
8
votes
7answers
6k views

What are the benefits of sudo over su?

What is the actual benefit that ubuntu (or debian derivatives) achieve by disabling root user. Everywhere I read, its says to prevent unintentional damages for inexperienced users. I want to know ...
8
votes
2answers
23k 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, ...
8
votes
3answers
3k views

sudoers - simple explanation requested

Everytime I want to be able to run something that requires me to be a sudoer too many times, I need to google for the formatting of /etc/sudoers to remind me again what exactly is the proper way to ...
8
votes
1answer
17k 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 ...
8
votes
2answers
41k 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 ...
8
votes
3answers
7k views

Home folder in `root` and not in `home`… I'm confused!

I have an issue with my home folder and this are giving me some permission problems. I've installed an application that tells me that I have no permission to save in /home/username/Desktop, but in ...