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
5answers
7k views

Always Sudo Privileges

I've searched for this, and the answer is probably in a million places on the 'net, but I can't find it... How do you give your account root privileges in Linux so that you don't need to sudo every ...
2
votes
1answer
5k 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 ...
15
votes
9answers
18k 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 ...
7
votes
3answers
4k views

How to run a Desktop graphical application just once under sudo?

For example, I'm trying to run Archive Manager from Ubuntu Desktop (10.04) under sudo otherwise it won't let me extract a Software Development Kit into /usr/local Update: I don't want sudo to be a ...
6
votes
1answer
17k views

“error: XDG_RUNTIME_DIR not set in the environment.” when attempting to run nautilus as root

I am attempting to run nautilus as root but when I run "sudo nautilus" from the terminal, I get the following error: error: XDG_RUNTIME_DIR not set in the environment. (nautilus:9341): ...
6
votes
1answer
10k views

Remove sudo privileges from a user (without deleting the user)

If you give a user sudo privileges how can I remove the sudo privileges and make the user become just a regular user? I used: sudo adduser username sudo Now I've changed my mind.
4
votes
1answer
1k views

Can't login to my account, I know the password

I use Xubuntu 14.04 64 bit. I was watching a movie, the desktop froze (as usual duh!), I logged out using a terminal, and couldn't log in to my account after that, I'm using a terminal. I type my ...
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 ...
3
votes
3answers
1k views

How to make sudo remember my password and how to add an application to startup

I guess this should be a simple thing for ubuntu users out there. I have two questions. Whenever I need to run some command that requires permission from root, I run as sudo followed by that ...
2
votes
3answers
744 views

Ways to run Nautilus with elevated privileges [duplicate]

What are the differences between the following ways to run Nautilus with elevated privileges: a) sudo nautilus b) gksu nautilus c) gksudo nautilus Which should I use?
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
3answers
4k 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 ...
1
vote
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
217 views

What is the difference between sudo X and running X as root?

My question is asking regarding a specific observation that I would like to understand. I just tried to install the package rJava in R and failed even though I prefaced the installation as suggested ...
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
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. ...
8
votes
3answers
19k 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
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 ...
3
votes
2answers
516 views

Why doesn't the command do-release-upgrade doesn't require sudo?

I was wondering why the command do-release-upgrade doesn't require sudo? I mean, it does significantly change your system, so I would have guessed it requires sudo. This is from ubuntu self, but it ...
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
4answers
20k 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
696 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
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): ...
2
votes
2answers
15k 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
146 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
4k 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
1answer
2k 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
15k 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
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
372 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
2answers
68 views

How to change permission of a drive in an external hard disk?

I had an old laptop. When it got complaint I removed its hard drive and started using it as external hard disk. It has an 80 GB of memory allocation for the windows C drive partition. But now i don't ...
0
votes
1answer
99 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
194 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
215 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
66 views

Repair filesystem permission

I accidentally executed sudo chmod -R 777 / I was actually trying to change a specific folder permission recursively, btw i did stop the command before it changed everything. But now, i can't ...
0
votes
1answer
426 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
703 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
2k 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
2k 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
944 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. ...
62
votes
4answers
401k 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 ...
30
votes
2answers
22k 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 ...
13
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 ...
21
votes
2answers
139k 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
130k 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.
12
votes
6answers
86k 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 ...
27
votes
1answer
36k views

Why is sudoers NOPASSWD option not working?

I have a NOPASSWD line in /etc/sudoers (edited with visudo) gatoatigrado ALL=(ALL) NOPASSWD: /bin/set-slow-cpufreq However, the output is, gatoatigrado@coral:~> sudo -n /bin/set-slow-cpufreq ...
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 ...
6
votes
2answers
23k 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 ...