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)

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
32k 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
908 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
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 ...
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
4k 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
618 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 ...
64
votes
8answers
24k 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
22k 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 ...
41
votes
3answers
15k 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 ...
27
votes
2answers
18k 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 ...
5
votes
2answers
1k views

How do I drop all elevated privileges through the terminal?

I did some authentication mounting where I added code like timestamp_timeout on sudoer. This setting will effect every mounting, where you must enter the user password. After entering the password ...
18
votes
6answers
32k views

How to run an application using sudo without a password?

... but still be required for applications that need admin privilegies? In order to allow the following: $ apache2ctl restart httpd not running, trying to start (13)Permission denied: make_sock: ...
1
vote
1answer
920 views

How to run a command with no-tty access, to run in admin privileges?

I would like to execute a command with administrative privileges, but do not have an access to the tty. I tried to execute it with the -A option of the sudo command and setting the environment ...
2
votes
0answers
191 views

What's the difference between sudo and gksudo when launching graphical applications? [duplicate]

Possible Duplicate: What is the difference between “gksudo nautilus” and “sudo nautilus”? It is common to see in instructions, the terminal command to edit a file: ...
1
vote
2answers
1k views

Wubi Install as Root User

Is it possible to install ubuntu from wubi with the root account (and have it show up in login screen, unlike when it is made manually with "sudo passwd root")?
3
votes
1answer
2k views

Ubuntu Server Automatically Insert Password Using Python3

I'm trying to create a small python3 program for my friend which will install and configure the nessarcary set-up for his Ubuntu Server. I want him to be able to start the program, give some basic ...
1
vote
1answer
912 views

Executing a Super-user command through .bashrc

Is it possible to execute a super-user command in .bashrc? And if so, how? It would save me having to execute "sudo /opt/lampp/lampp start" on each startup. I've considered using the LAMP stack from ...
15
votes
5answers
9k views

su command + authentication failure

I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure. So I checked on the internet and then went into recovery mode and ...
2
votes
2answers
181 views

Looking for a log thats bound to sudo

I've issued the commands sudo su, and sudo sh. Can you please tell me if there are logs associated with sudo, and where I could find them?
4
votes
3answers
14k views

Mounting filesystem with special user id set

I want to mount the device /dev/sda3 to the directory /foo/bar/baz. After mounting the directory should have the uid of user johndoe. So I did: sudo -u johndoe mkdir /foo/bar/baz stat -c %U ...
8
votes
1answer
560 views

how come sudo give root privileges for a user not in /etc/sudoers?

I just wonder how sudo privileges are found with ubuntu, from a technical point of view. Users with sudo privileges are not present in /etc/sudoers, so this looks a little bit exotic. Was the source ...
1
vote
1answer
190 views

How to detect another sudo process?

Whenever a command is "unable to lock the administration directory", is there any way to easily detect what process is running that is using sudo?
4
votes
2answers
2k views

Problem installing ruby and gems

I just installed ruby using apt-get with the following command: sudo apt-get install ruby1.9.1-full But when I try to do sudo gem install ... it says that I have not installed gems and that I shoud ...
5
votes
2answers
2k views

Can't perform regular sudo commands, have to use su now

I'm an ubuntu newbie I just installed 10.10 and I don't know what I did but now to perform actions that required sudo privileges (open synaptic, mount device, run apt-get install, etc) the OS won't ...
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 ...
1
vote
2answers
683 views

alias with parameters

I was recently starting to setup my usual alias. I ended up needing to pass more information than my alias originally needed $ alias runserver = 'python manage.py runserver' $ runserver 80 // turns ...
4
votes
3answers
2k views

I want a non admin user to install software. What commands do I need to add to sudoers?

I want to edit the /etc/sudoers file so that a non-admin user can install software via the Software Center in Linux Mint 10. The reason for this is that I want a user to have the capability to ...
3
votes
1answer
646 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 ...
0
votes
1answer
638 views

permission error on Ubuntu? [duplicate]

Possible Duplicate: Sudo permissions error Hi, I am getting the following error: sudo: unable to resolve host XXX sudo: /etc/sudoers is mode 0666, should be 0440 Segmentation fault To ...
6
votes
2answers
5k views

Regain Sudo rights after removing from admin group [duplicate]

I accidentally removed myself from the admin group when editing the user. Now I can no longer use sudo. The error says: ber is not in the sudoers file. This incident will be reported. I booted up ...
0
votes
2answers
1k views

sudo access per folder? is that possible?

is it possible to give sudo privileges to a user for a specific folder? e.g i want the user 'dads' to have sudo access for creating/deleting files in a folder 'virgo' in /opt
6
votes
2answers
277 views

To be granted root rights while browsing files/directories with Nautilus 2.30

I'd like to know if there a way to be granted root rights while using Nautilus 2.30 ? For example I'd like to move some old folders of long unused users from the home directory - remains of previous ...
1
vote
1answer
850 views

unable to use synaptic via launcher

When I open synaptic via launcher on gnome-panel, it opens and asks me for the password but if I enter the password, it says its wrong even though the password is correct and it used to work OK few ...
10
votes
1answer
835 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 ...
2
votes
1answer
4k views

How can I make sure an environment variable is set when I sudo?

How can I make sure an environment variable (GRAILS_HOME for example) is set when I sudo? I put a script in my /etc/profile.d with this value and made it ugo+x. What do I need to do to make this ...
2
votes
2answers
1k views

sudo: setuid must be root

I changed the ownership of my /usr directory to 777 by mistake and now my system give this error whenever I try to use sudo: sudo: setuid must be root
1
vote
2answers
2k views

I am in group root and cannot use synaptic or sudo

I do not know the root password. I am only in group root. How do I add myself to other groups? I am getting this error on trying to open root terminal: Failed to run ...
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 ...
32
votes
2answers
9k views

Aliases not available when using sudo

I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using sudo: danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' ...
8
votes
3answers
15k 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 ...
3
votes
3answers
963 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
1answer
10k views

How can I edit my httpd.conf file?

I have XAMPP installed, and need to edit my httpd.conf file to add a virtual host block. If I right-click on the file in Nautilus and open with gedit, I can see all the content, but it's read-only. ...