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)

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 do....
1
vote
2answers
755 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
3k 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
823 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
721 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 ...
8
votes
2answers
7k 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
382 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
2answers
930 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
1k 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
2answers
6k 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 permissions 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 How do I fix this issue?
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 /usr/bin/x-terminal-...
47
votes
3answers
10k 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 ...
72
votes
4answers
21k 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' ...
9
votes
3answers
21k 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
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 command....
3
votes
1answer
13k 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. ...
5
votes
5answers
12k 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 ...
22
votes
4answers
58k 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 /etc/bash....
25
votes
3answers
9k views

Redirect the output using `sudo` [duplicate]

I have a small question regarding using sudo with output redirect >. To enable IP forwrding, someone can use the command: echo 1 > /proc/sys/net/ipv4/ip_forward Executing this command will ...
1
vote
1answer
6k views

Sudo and startup script

I have a new asus 1215n and I need to digit commands to enable multitouch. No problem: I've made a script. Since this netbook also need manual activation of the wifi driver the complete script is: #!/...
1
vote
2answers
795 views

Error with missing Wallpaper after remove unity from sudo command

After I paste these scripts into terminal, my wallpaper became white. sudo ln -s /etc/xdg/xdg-une/autostart/maximus-autostart.desktop /etc/xdg/autostart/ sudo ln -s /etc/xdg/xdg-une/autostart/netbook-...
19
votes
2answers
14k views

“sudo cd …” one-liner?

Occasionally I want to cd into a directory where my user does not have permission, so I resort to sudo. The obvious command sudo cd somedir doesn't work: $ sudo mkdir test $ sudo chmod go-rxw test $ ...
2
votes
2answers
699 views

Can't access any functions after chown command

I am not being to access any functions in my desktop and I don't have an OS besides Ubuntu and I am new to Ubuntu. I think I rebooted my computer thinking that Google Chrome crashed. I opened Google ...
1
vote
1answer
11k views

How do I enable a user to sudo without password?

I have a php script with this: <?php #echo exec('whoami'); $output = shell_exec('bash /usr/local/svn/bash_repo/make-live'); echo "$output"; ?> The make-live script contains this: #!/bin/...
6
votes
3answers
943 views

Why is this bypassing the SUDO password?

I have a bash script I am using to automate a SVN checkout. The contents of the file were: #!/bin/bash cd /var/www-cake sudo svn checkout file:///usr/local/svn/bash_repo/repo/ Then when I double ...
0
votes
3answers
536 views

Security problem with sudo su?

By typing sudo su, any sudoer can go into the root prompt & thus change the root password! Then what is the use of having a root & then the sudoers , because now sudoers can interfere with ...
8
votes
1answer
522 views

For what duration is sudo_root in “don't-prompt-for-password” mode?

The first time a user enters sudo foo, sudo_root prompts for the password. For a certain duration after that, sudo_root doesn't prompt for a password for any subsequent sudo foo's in that terminal ...
12
votes
4answers
6k views

How to prevent system applications (like the Software Center) from asking for password?

I'd like Software Center, Update Manager and some other system management applications to work without asking for password (like sudo does if configured with NOPASSWD) but only asking for a ...
9
votes
6answers
6k views

Disabling shutdown command for all users, even root - consequences?

I would like to disable the shutdown command for all users, even root, on an Ubuntu Server installation. The reason I want to do this is to ensure that I don't get into the habit of shutting down the ...
1
vote
0answers
403 views

Ubuntu Root user [duplicate]

Possible Duplicate: How to know my root password? Hi folks, I have been getting hands on Ubuntu and really liking it. Though someone of the terms really confuse me. One such confusion is: "...
11
votes
3answers
16k views

Save an edited file in nano, but no permissions

I edited a file in /etc/ that I want to save, but forgot to open it using sudo. I remember there was a command to save such a file in vi, and want to know if there is any such way to do it in nano? ...
0
votes
1answer
199 views

update-manager doesn't request PW - just NOOPs

I upgraded to Maverick and now I never get the password dialog that 10.04 had for installing packages - it just NOOPs from the GUI. Ran update-manager with user privileges from terminal and no error ...
19
votes
3answers
5k views

How to cancel the currently-applied remaining sudo time-out?

When I've just run sudo, and don't want it to remain active for the normal duration of its time-out, how can I cancel that remaining active time-out? sudo -k kills it for the current terminal ...
21
votes
4answers
15k views

Is the difference between sudo and gksu the same as the difference between sudo -i and sudo -s?

Is the difference between sudo cmd and gksu cmd, the same as the difference between starting a shell with sudo -i and sudo -s? ... or put another way, Is sudo cmd the same as sudo -i cmd and gksu ...
76
votes
8answers
37k views

What is the difference between “gksudo nautilus” and “sudo nautilus”?

I've been using gksudo nautilus and sudo nautilus through Alt+F2. What's the difference? They look very similar!
11
votes
2answers
404 views

How come you don't need sudo privileges to update the packages list in the 10.10 Update Manager?

I have noticed that when I press the "Check" button from the Update Manager in Maverick, it starts directly downloading the information on packages without asking me my password (sudo verification) ...
5
votes
4answers
9k views

How do i transfer files over ssh after sudo?

I have access to a box over ssh and there are some files i'd like to transfer to another machine, but those are only accessible under another account so if i ssh with 1, then sudo 2 i can browse them ...
2
votes
1answer
184 views

“Key” Panel Indicator Missing

I'm hoping I'm not imagining things, but I'm fairly sure that I saw a clean 10.04 install with a key icon displayed in the menu bar. I believe it appeared when sudo was active for updating, etc. I don'...
493
votes
6answers
1.5m views

How can I add a new user as sudoer using the command line?

After I add a user using adduser, I can't see it via System->Administration->Users and Groups unless I logout and then login again. Is that normal? Also, can I set a newly added user as a ...
16
votes
9answers
23k 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 ...
3
votes
1answer
492 views

GUI sudo not working?

I accidentally screwed up the groups for my main user by doing sudo usermod -G blah instead of sudo usermod -a -G blah. On realising this, I immediately rebooted into single user mode and added the ...
7
votes
3answers
5k 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 ...
115
votes
5answers
262k views

How do I add a user to the “sudo” group?

In /etc/sudoers I see this: # Allow members of group sudo to execute any command after they have # provided their password # (Note that later entries override this, so you might need to move # it ...
4
votes
2answers
597 views

Nautilus automatically browses as root

I used gksudo nautilus (not through the terminal but through the 'Open With' command) for some copy & paste stuff that requires root access. But now whenever I open the file browser (Nautilus) to ...
15
votes
2answers
4k views

Why do I need root privileges to umount a drive at the command line, but not in Nautilus? How to change that?

When I insert a thumb drive, media card, or USB hard drive, to unmount it via the command line, I need to use: sudo umount /media/the_device But, I can unmount the device in a file manager like ...