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)

5
votes
2answers
8k 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 ...
79
votes
12answers
100k views

How to modify a invalid /etc/sudoers file? It throws out an error and not allowing me to edit again

How do I edit an invalid visudo file? Here is what happens: $ sudo visudo >>> /etc/sudoers: syntax error near line 28 <<< sudo: parse error in /etc/sudoers near line 28 sudo: no ...
4
votes
1answer
5k views

How to allow execution without using the sudo?

I am writing a Java application where i need to do a command line execution and get a result back, but when i execute the command, it ask for sudo password. So far i tried: $ sudo -s $ vim ...
2
votes
1answer
823 views

Admin users on an Ubuntu Core installation

I installed Ubuntu Core using these instructions, and added a user. But when I try to add the user to the admin group, it says the group does not exist. What do I do? PS I had to install sudo, ...
33
votes
5answers
68k views

Difference between “su”, “sudo -s”, “sudo -i”

I already read it from manual but I can't see difference.. su - change user ID or become superuser sudo -s [command] The -s (shell) option runs the shell specified by the SHELL environment ...
25
votes
3answers
16k views

How do I add myself back as a sudo user?

I clean-installed Ubuntu 11.10 today, and then installed VirtualBox. This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a ...
2
votes
1answer
354 views

My only account is not in the sudo group

I installed Ubuntu 11.10 with a username fooname. And then I did something like sudo usermod -G vboxsf fooname Then, guess what: no one is a sudoer. How can fooname be back as a sudoer? In ...
2
votes
1answer
2k views

No access to my own external hard drive?

I have only used my external hard drive once, wich was with my previous Ubuntu installation (11.04), on the same laptop. I have created 2 partitions, FAT32 and EXT4. Now I needed to get some data from ...
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 ...
1
vote
1answer
481 views

How can I run sudo hidd --search without a password?

If I run hidd --search it says HID create error 13 (Permission denied) If I run as sudo it connects fine. I want this script to run on login. I saw how to edit sudoers, but will it create a ...
0
votes
2answers
838 views

How to run Synaptic with sudo privileges?

How to launch a program with sudo privilege in Unity? I am using Ubuntu 11.04. I used this command but it doesn't really work: sudo synaptic
4
votes
1answer
2k views

How to setup sudoers for Apache web service?

# User privilege specification root ALL=(ALL:ALL) NOPASSWD: ALL apache ALL=(ALL:ALL) NOPASSWD: ALL me ALL=(ALL:ALL) NOPASSWD: ALL In Fedora both works: http://localhost/test echo ...
3
votes
3answers
18k views

Add AD Domain user to sudoers from the command line

I'm setting up an Ubuntu 11.04 server VM for use as a database server. It would make everyone's lives easier if we could have folks login using windows credentials and perhaps even make the machine ...
2
votes
1answer
7k views

How to uninstall Ubuntu Software Center in 11.10? [duplicate]

I am trying to uninstall software center for ubuntu oneric using the command sudo apt-get remove software center and get this as result Reading package lists... Done Building dependency tree ...
4
votes
1answer
5k views

/etc/environment and /etc/profile.d/* ignored for the root user [duplicate]

How do I set global environment variables in Ubuntu, in such a way, that they would apply also to root user? Setting PATH or JAVA_HOME in /etc/environment or in /etc/profile.d/my_settings.sh both ...
4
votes
2answers
2k views

Allow user to execute sudo commands

I've looked at Add user to "sudo" group and added user (say 'abc') to sudo group But now when user 'abc' tries to use sudo commands ubuntu says, 'abc' is not in sudoers list, this incident ...
2
votes
2answers
869 views

enable auto-completion of apt-get for non-privileged user?

I've enabled apt-get in SUDO without password , and bash autocompletion for it need to be enabled as well , but how ? If i try to source that file: %> . /etc/bash_completion.d/apt No command ...
1
vote
4answers
5k views

Sudoers permission without loging in as root

I am a new user to Ubuntu 10.10 My problem is when I start my machine it takes me to login screen of Ubuntu but I didn't get option for logging in as user or root I know my root password and all even ...
0
votes
2answers
229 views

How do I switch default root authorization app?

Somehow I've messed everything up and when I open a program like time-admin and click "Click to make changes", it uses a Qt / KDE style interface rather than the Gtk style. Running gksudo ...
1
vote
2answers
753 views

How do I get Unity to launch “Log File Viewer” as root?

By default, "Log File Viewer" is not launched from Unity as root in Ubuntu 11.04. This is pretty useless, as most of the log files are only readable by root. How can I change this behavior so that it ...
7
votes
1answer
261 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?
2
votes
3answers
609 views

how to recover from mounting /usr/ nosuid

I was able to move /usrto an external harddrive. In fstab I mistakenly mounted the drive with nosuid. Now I can't use sudo or su. I can't edit the fstab entry. When I manage to open it I can't do so ...
89
votes
10answers
107k views

Error message when I run sudo: unable to resolve host (none)

I have this issue on AWS on some servers. Whenever I run sudo the terminal is stuck doing seemingly nothing, until it finally spits out this error message. My terminal looks like this: ...
5
votes
1answer
3k views

I accidentally removed myself from sudoers, how can I fix this? [duplicate]

I have one admin account and recently I have accidentally added myself to a single group (usermod -G without -a). So, I am not in the sudoers file any more. However, it is not possible to log in to ...
1
vote
2answers
3k views

Add user that can read / write a root, www-data files

How can I do that? I got user amira on my Ubuntu 11.4, I want him to able to see / read / write a root user files such as /etc/* and apache files
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?
1
vote
2answers
297 views

sudo, su problems [duplicate]

During the installation process I was asked to set a password. I chose a password (a strong one) and everything goes smoothly every time I log in. Problems arise whenever I resort to "sudo" or "su" ...
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 ...
2
votes
1answer
307 views

why is access denied when I run hwinfo

I recently had someone install ubuntu on my laptop and something just doesn't feel right about it. I am a newbie and don't really know what I'm looking for or how to look for it. after trying to make ...
3
votes
3answers
162 views

Will my windows partition be affected if I re-install Ubuntu?

I am new to Ubuntu. I recently changed all permissions of the /etc directory in order to edit the hosts file. After that, I realized it was a big mistake. I'm also running Ubuntu along side windows7 ...
3
votes
1answer
706 views

Why does a command work from shell, but not from the applications menu?

I'm trying to add a command to my applications menu: But when I select it from the applications menu, it doesn't do anything. When I run that same command from the shell, however, it runs fine. ...
1
vote
1answer
623 views

ddclient not working without sudo

When I run ddclient (DynamicDns Updator) without sudo, I get WARNING: file /etc/ddclient.conf: Cannot open file '/etc/ddclient.conf'. (Permission denied) stat() on closed filehandle FD at ...
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 ...
8
votes
1answer
2k views

Why should I use gksudo for Gtk apps instead of sudo? [duplicate]

I read somewhere that people should use gksudo for applications that use the Gtk GUI instead of sudo? What's the reasoning for this?
23
votes
6answers
33k views

sudo error, is mode 0777, should be 0440

I am getting sudo errors, how do I fix this error? sudo: /etc/sudoers is mode 0777, should be 0440 sudo: no valid sudoers sources found, quitting
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 > ...
5
votes
4answers
9k 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 ...
4
votes
2answers
931 views

Unable to launch nautilus with sudo [closed]

When I run Nautilus with sudo, gksudo or Alt+F2, I get this error message: Initializing nautilus-gdu extension ** (nautilus:2352): WARNING **: Failed to get the current CK session: ...
0
votes
1answer
515 views

Is there a way to never have to put in your password after you have logged in? [duplicate]

Possible Duplicate: How to make Ubuntu remember forever the password after the first time I put my password in when I log in but after that I don't want to type it again. When I use my ...
4
votes
1answer
7k views

problems with sudo permissions - /var/lib/sudo owned by uid

my system is a new 11.04 ubuntu and i recently started working with LAMP. some how, when i tried to change permissions of the var/www/ for netbeans to work on the local server, and did something that ...
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 ...
6
votes
2answers
5k 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, ...
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. ...
7
votes
1answer
632 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 ...
70
votes
8answers
26k views

How to avoid using sudo when working in /var/www?

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.
1
vote
1answer
2k views

Unable to kill process with 'kill -9' whose PPID=1 and using 100% of CPU?

Direct Question: Flash under firefox 4.0, npviewer.bin, in KUbuntu 10.04 was running at 100% and I couldn't kill it. I tried: sudo kill -9 12996 sudo kill -15 12996 I logged in as root and ran ...
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 ...
2
votes
1answer
4k views

Simple file doesn't run (command not found!)

Here in the screen shot, there is a window and terminal open. I am running on Ubuntu 10.04(kernel 2.6) LTS 64bit LiveCD session, and trying to run testDisk to recover my another formatted ...
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 ...
43
votes
3answers
16k views

What is the difference between the 'sudo' and 'admin' group?

I noticed that two groups are granted similar-looking permissions in /etc/sudoers: # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute ...