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)

4
votes
4answers
5k views

'sudo' not found in Turnkey linux Ubuntu install

Just installed a turnkey linux ubuntu/apache/tomcat vm image. After some trouble getting the bridged network adapter installed on win7, I wanted to check network access to and from the vm. Verified ...
3
votes
2answers
442 views

If I make a script that requires root privileges, do I need to put sudo in the script too?

I'm working on an installer script for the latest ATI drivers (as they are not in repo) and was wondering if I need to include sudo in the script, because it will be needed for the install.
1
vote
1answer
1k views

Where will be my Grails default installation location?

I installed Grails using this command : sudo apt-get install grails-2.0 It installs and it works fine. Now where I can find my installation files? Since I'm newbie to Ubuntu I couldn't able to ...
2
votes
1answer
396 views

Problem accessing superuser with sudo

Through Virtualbox didn't allow me use USB because my account wasn't a vboxuser group, I've to run this command: $sudo usermod -G vboxusers brallan After I needed to access to superuser privileges ...
2
votes
2answers
2k views

sudo -i only allows one argument

Is this normal? > sudo -u misc -i "ls" note test tmp > sudo -u misc -i "ls ~" -bash: ls ~: command not found > sudo -u misc -i "ls ~" -bash: ls ~: command not found > sudo -u misc -i ...
2
votes
1answer
826 views

Is there a difference between using setuid()/setgid() within a program and invoking it with sudo -u xxx -g xxx?

Consider this python script, which invokes HandBrakeCLI, a program that attempts to read from the dvd drive: invoke.py #!/usr/bin/python import sys import os import subprocess as subp import ...
12
votes
4answers
205k 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: ...
2
votes
2answers
1k views

How to pass arguments in a script using gnome-terminal

As part of a script I have gnome-terminal -e "process involving another user" Once executed this line, I have to write in the terminal 3 times the password of this user. I wonder how can I automate ...
11
votes
1answer
6k 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 ...
0
votes
1answer
311 views

Executing adb from php

I am trying to run adb from PHP using: exec( 'adb devices', $output, $return_val ); but I get 126 error. I think the problem is that php is running as 'www-data' user and does not have permissions ...
5
votes
2answers
530 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 ...
0
votes
3answers
2k views

Login as different user in Gnome if you are have root privileges

I want to login as a different user in Gnome and not to run a single program only, but I don't know the users password, I don't want to know it and I don't want to change it, but I'm sudoer. Is there ...
3
votes
1answer
449 views

Why does my machine suddenly not allow the “sudo” command?

I was working on my machine. I did some Clamav Virus definition updates, ran clamav and everything worked fine using sudo. Suddenly afterwards though, my machine started saying that sudo: no valid ...
3
votes
2answers
19k views

I cannot enter my password in the terminal - can't install packages [duplicate]

Possible Duplicate: Nothing shows up on the screen when I type my password I can open a terminal (Ctrl-Alt-T) I can copy or type in the following: sudo wget ...
1
vote
1answer
435 views

I can't do “sudo”

Let's describe it from the beginning: I was planning to re-enable the password requirement in LightDM for security reasons. But, since my PC's been sluggish these times, it FC'd the password setup ...
2
votes
2answers
593 views

rm -i alias not working with sudo as root

I have noticed in all my Ubuntu servers the alias rm -i is ignored when you run sudo rm * as root. Is there something in sudo that is causing this behavior? I know you don't need to use sudo when you ...
11
votes
1answer
10k 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, ...
3
votes
1answer
1k views

Permission denied on /dev/xvdf despite sudo?

I'm trying to get a stream off port 9999 and write to /dev/xvdf. I'm using Amazon EC2 with the Ubuntu 11.10 server image. By default I log in as 'ubuntu' which has sudo privileges. However, when I run ...
3
votes
2answers
5k views

How to copy a directory from your home to a system wide one

I want to use the file manager to copy a directory from my Desktop to the /opt directory. When I run gksudo nautilus, I do not see anything in the Desktop directory. If I open Nautilus normally from ...
4
votes
1answer
3k views

I am no longer in sudoers? [duplicate]

Possible Duplicate: How do I add myself back as a sudo user? jiewmeng is not in the sudoers file. This incident will be reported. Whats happening? Its a home PC with me as the only ...
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. ...
53
votes
4answers
348k views

How do I start/stop mysql server?

I try find in internet some article where describe how correct start -stop mysql server. I find this article: How to start/stop MySql server on Ubuntu 8.04 | Abhi's Blogging World I run this ...
3
votes
1answer
5k views

Terminal problems entering password

Every time I try to enable shell theme extension or anything in general in Terminal it asks me for a password but won't accept it.
2
votes
0answers
4k views

“no valid sudoers sources found, quitting” error, how to fix it? [duplicate]

Possible Duplicate: How to modify a invalid /etc/sudoers file? It throws out an error and not allowing me to edit again at the time of running sudo command i got the following error: ...
2
votes
1answer
1k views

Ubuntu 11.10 with KDE installed does not prompt for elevation for privileged ops in all apps

I installed the KDE window manager on top of Ubuntu 11.10 and while I am using KDE, I do not get an elevation dialog when I try to perform tasks that require root privileges. Instead, the operations ...
1
vote
2answers
270 views

Upgrade process interrupted; can't boot and need to recover protected data

I was using Ubuntu 11.04 and upgrading to 11.10. While the installation process was going on I shut it down. It can't come on again by itself. It will end up showing the status line "checking battery ...
17
votes
2answers
120k views

I want to copy a directory from one place to another via the command line

I want to copy a directory from one place to another folder. sudo cp is the command, but after that what should I type? The destination or source first?
6
votes
4answers
16k views

Deleted Myself from Admin Group - Now Getting Error usermod: cannot lock /etc/passwd; try again later [duplicate]

Possible Duplicate: Cannot lock '/etc/group' in recovery mode I have a laptop with Ubuntu 11.10 that is shared between myself and two other family members. My user id was setup as ...
5
votes
1answer
238 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?
0
votes
2answers
3k views

Unble to use administrator account created without password

I installed Ubuntu 11.10 two days back. Today I added a user named vivi and set it to administrator. And I just changed vivek, my username, to standard user. Now, since I created new user vivi, I have ...
45
votes
3answers
9k views

When to use pkexec vs. gksu/gksudo?

There are two general ways to run applications graphically as root (or, more generally, as another user). Programs like gksu, gksudo, and kdesudo are graphical frontends for sudo. In contrast, pkexec ...
2
votes
2answers
11k views

Call a shell script from PHP, run as root

I'm running ubuntu 11.10. I want to be able to call a shell script from php and run that script as root. When my php attempts to call the shell script as root --like this: $output = shell_exec('sudo ...
1
vote
3answers
143 views

How do I limit administrative tasks for normal users?

I want to limit administrative tasks, so users cannot mess up the system. My idea was to install Ubuntu, set up automatic login, and hand it to the users without them knowing the password. However, I ...
5
votes
2answers
9k 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 ...
81
votes
12answers
105k 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
6k 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
832 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, ...
36
votes
5answers
72k 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
360 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
493 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
853 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
881 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 ...