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)

1
vote
3answers
3k views

How to reset default permissions for /etc?

By mistake I have made permission changes for /etc. Now it's giving me the following error message: bash: /etc/bash.bashrc: Permission denied I have no name!@chandan-Inspiron-5520:~$ sudo ...
40
votes
0answers
10k views

How can I determine whether a shellscript runs as root or not? [duplicate]

Possible Duplicate: How can a script check if it’s being run as root? This is something I've been curious about. I make a lot of small bash scripts (.sh files) to do tasks that I routinely ...
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
2answers
17k 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 ...
4
votes
1answer
6k 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 ...
3
votes
2answers
2k views

Won't execute terminal commands

I have been using Ubuntu 12.04 for quite a while and have never had a problem come at me out of the blue like this. I'm trying to install python 3.2 on my Ubuntu system and every time I run the code ...
3
votes
2answers
1k views

How do I give root privileges to an app?

I tried to submit an app to the Ubuntu Software Centre but it was rejected because you needed to put in the admin password to use it. I need to grant root privileges to the app for it to function so I ...
3
votes
3answers
17k 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 ...
3
votes
1answer
658 views

Sudo permissions error

I am getting the following error: sudo: unable to resolve host XXX sudo: /etc/sudoers is mode 0666, should be 0440 Segmentation fault To start xampp, I typed sudo /opt/lampp/lampp start Please ...
2
votes
2answers
13k views

I cannot enter my password when using sudo to install Sophos AV for Linux [duplicate]

I cannot type my password as shown below. After successfully unlocking root account in Ubuntu 12.04 LTS. saintmichael@ubuntu:~$ sudo usage: sudo [-D level] -h | -K | -k | -V usage: sudo -v [-AknS] ...
1
vote
2answers
101 views

Specify password for sudo in script

I am making a script that will update my system (and do some other things, but that doesn't matter). I want the script to run sudo apt-get update and sudo apt-get dist-upgrade --yes automatically. I ...
1
vote
3answers
2k views

/etc/profile permission denied

I'm running an Ubuntu 12.04 LTS partition and I've recently have had issues logging in. From the GUI login screen, when I enter my username and password, it takes me right back to the login screen. ...
1
vote
3answers
6k views

Sudo not available in guest login

When I login as guest I am unable to execute any command with sudo. E.g.: sudo ps returns: sudo: unable to change to sudoers gid: Operation not permitted How can I fix this?
1
vote
1answer
1k views

How can I fix “dpkg: error: parsing file”?

... and what is sudo and where/how would I type the scripts I've seen in some related answers? Yes I am very new to Linux, and am using Ubuntu 12.04 LTS. All updates are failing with ...
1
vote
3answers
12k views

sudo su fails with 'Unable to change to sudoers gid :operation not permitted.' fault [closed]

I have installed ubuntu and now I want to install flex. It asks for password but when I type my password, it asks me the password for root. When I enter the password which I had specified during ...
1
vote
1answer
3k views

Unable to launch gedit with sudo

While trying to follow these instructions, I encountered the following error while attempting what seems like a simple sudo edit operation: $ sudo gedit /var/lib/dpkg/status ** (gedit:14898): ...
1
vote
3answers
2k views

When trying to install Wine on 12.10, 'Sudo' command will not let me type in a password

As the title explains, I have been attempting to install Wine on my laptop which is running 12.10. When I access the command terminal and entered sudo add-apt-repository ppa:ubuntu-wine/ppa I was ...
1
vote
4answers
357 views

Why does nothing work after I randomly changed some file permissions?

Ok so last night i was trying to set permissions to some folders in my File System, since apparently im not an admin on my own computer. And now everything got messed up today and i don't know what to ...
0
votes
0answers
46 views

Creating a sudo && code && prior installing all necessary software? [on hold]

I'm testing out a code to install most common stuff, update the system and perform post-installation cleanup on fresh install. Allot of stuff can be done with just 1 click. EDIT: Were talking here ...
0
votes
1answer
84 views

block certain dangerous commands?

In my High school there are few computer having Ubuntu 14.04 installed and many students know the Root password, how can I block/disable certain dangerous commands like :- rm -rf / rm -rf * ...
0
votes
2answers
153 views

What is the root user

If you use sudo su - or sudo -s you will get the full root certification "likewise a root user ". Is this user an official user or is it from canonical? ~$ sudo su - [sudo] password for username: ...
0
votes
1answer
111 views

Wrong Permission to /etc folder [duplicate]

I given wrong permission to the /etc folder wrongly chmod -R 777 /etc While i want to login as root it gives me error and gives the following output. How can i give the correct permission and fix ...
0
votes
1answer
179 views

Correct permissions for sudo LAMP /var/www directory

I am trying to set permissions with sudo 775 - R /var/www/ on all folders and all files in the www folder of lamp for sudo user. Is this the correct way to set up the system?
0
votes
2answers
541 views

Software Center prompts password of another user

I have a krb5-ldap user in an "administrators" which is added to sudoers list as follows: %administrators ALL=(ALL) ALL Now that works fine for all sudo operations. But when that user wants to ...
0
votes
1answer
1k views

Any way to get sublime text to save settings files without running as sudo

I installed Sublime Text 2 the following way, but what I do not like about it is that I have to run it as sudo to save the user settings files. Any ways around this? Thanks, Colin sudo ...
0
votes
1answer
1k views

How can I delete my printer from Ubuntu?

Using 12.04 my printer a canon ip2600 will not print. SystemSettings/printers shows it as installed, connected to local host, enabled, accepting jobs, shared and allowing printing for everyone. Yet ...
0
votes
1answer
1k views

The package sudo needs to be reinstalled, but I can't find an archive for it

It seems I have landed in trouble.... on running update-manager or synaptic I get this message "E: The package sudo needs to be reinstalled, but I can't find an archive for it." I searched for ...
0
votes
0answers
14 views

How do I authenticate over a domain while doing apt-get update? [duplicate]

I am getting various 401 auth errors when trying to sudo apt-get update. I am connected to my corp vpn and have an SSH into my Ubuntu machine. How can I authenticate using my network login/pw to ...
-1
votes
1answer
847 views

Python script to change the jack from input to output does not work in 13.04 [closed]

To change the jack from input to output for any computer or laptop I followed this question: How do I change which audio jacks are used for input and output? But the Python script does not work. ...
46
votes
4answers
315k 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 ...
27
votes
2answers
19k views

after upgrade gdb won't attach to process

I just recently upgraded from 10.04 to 11.04 and gdb won't allow me to attach to processes anymore I get the error Attaching to process 10144 Could not attach to process. If your uid matches ...
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 ...
16
votes
2answers
107k 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?
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 ...
8
votes
2answers
40k 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 ...
5
votes
4answers
102k 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.
25
votes
4answers
8k views

How to get out of “sudo -s” command in Terminal?

I entered sudo -s command in terminal, and the it changed from shameek@shameek-K55VD:~$ to root@shameek-K55VD:~#. Now when I click on the close terminal window icon it says, "There is still ...
10
votes
3answers
440 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 ...
8
votes
6answers
67k 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 ...
5
votes
2answers
18k views

Cannot connect to X Server when running app with sudo

When I am running some software using sudo command it showing error like cannot connect to X server For example if I run the following command: $ sudo gedit /etc/profile I am getting ...
5
votes
4answers
15k 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 ...
4
votes
3answers
14k views

How to execute sudo commands with Expect & send commands in bash script?

Can any body let me know how to execute sudo commands with expect. I tried the following but this is not working. Can anyone give me suggestion please? set login "sasuke" set addr "hostname" set pw ...
3
votes
4answers
7k views

/usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I have run following command accidentally sudo chown [username] -hR / Now sudo su getting error: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set How to Solve This?
3
votes
2answers
2k views

How Do I Stop The Service Sudo?

I want to make it impossible for any root commands to be issued during a Live Boot session. I don't want anyone being able to sign in as root. Period! So, is it possible to stop the sudo service? ...
1
vote
2answers
9k views

Unable to install xampp in ubuntu 13.04

I am installing xampp in ubuntu 13.04, but while installing the xampp.. when i try to extract the file .. it shows the following message sudo tar xvfz xampp-linux-1.8.1.tar.gz -C ...
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 ...
10
votes
4answers
19k 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 ...
7
votes
4answers
28k 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
1answer
2k views

Changed owner of /usr/bin

I did it... I guess everyone does it sometime, but this was my first. I executed sudo chown -R /usr/bin and before I realized my mistake, it was too late... Now I can't access sudo because I receive ...
4
votes
2answers
32k views

Launch Sublime Text 2 from terminal [duplicate]

I am new to Ubuntu and is trying to configure my environment so i can launch Sublime Text 2 directly from the terminal. I followed the solution on this post but no luck so far. These are steps I did ...