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)

6
votes
1answer
3k views

sudo su doesn't change users for mysql

Last night, on my server, I did: sudo su - mysql to change to the mysql user so I could run the mysql client, which is set up so it will only authenticate from the mysql account. I successfully ...
6
votes
6answers
4k 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 ...
6
votes
2answers
2k views

How can I ensure the `snd-hda-intel` module is loaded on startup?

I need to type sudo modprobe snd-hda-intel in order to get my sound card to work. What config file do I need to edit and what edit should I be looking to make so I can get the sound driver loading ...
6
votes
1answer
5k views

Errors followed by command “Sudo nautilus”

I have opened Nautilus with root power to delete some items.When I typed Sudo nautilus,the particular window opened up,but some errors also came along with it as following: meego@meego-Notebook-PC:~$ ...
6
votes
2answers
308 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 ...
6
votes
1answer
3k views

What is the equivalent of gksudo in Kubuntu/KDE?

In regular Ubuntu (Unity/Gnome), I use gksudo to run GUI programs with root privileges. I'm trying out Kubuntu (or KDE) now -- what do I use?
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
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 ...
6
votes
1answer
206 views

How do I safely run a graphical application as a normal user while root?

We often talk about using gksu, sudo -i and pkexec to run things as root while a normal user but I'm facing the opposite problem today. The script I'm using is running as root. I need it to start a ...
6
votes
3answers
6k 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. ...
6
votes
1answer
244 views

Lost sudo privileges [duplicate]

Last night I was working on installing vsftpd on my Ubuntu 12.10 server. I shutdown last night and when I booted up this morning I seemed to have lost the abilities to sudo anything. It just says, "** ...
6
votes
1answer
1k views

Opening terminal asks for sudo password

Whenever I open a new terminal within 12.04, I am prompted to enter my sudo password. Why is this happening?
6
votes
2answers
993 views

How do I work around sudo 'segmentation fault' on basic bash commands?

I am sure the answers are out there, but alas there are too many answers (here and elsewhere) to other questions stopping me from finding them. I just encountered something substantially similar to ...
5
votes
3answers
863 views

Why is this by passing 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 ...
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 ...
5
votes
5answers
1k views

Should I use “sudo” before “make install”?

I am installing the latest FFmpeg from this guide: In some places it suggests performing make install without sudo, here is a single example of several: cd ~/ffmpeg_sources wget ...
5
votes
1answer
9k views

how to shutdown a linux machine, including the root password, in 1 line?

How do you include the root password, say for shutting down an ubuntu machine? like, sudo shutdown now is it possible to include the password on this 1 line? like an extra parameter? reason for ...
5
votes
2answers
8k views

What's the difference between 'sudo [command]' and 'sudo sh [command]?

I'm trying to install VMware Workstation in my Ubuntu 12.04.2 LTS. If I execute the following command: sudo ./VMware-Workstation-9.0.1-894247.x86_64.bundle it finishes at once and the installation ...
5
votes
4answers
7k 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 ...
5
votes
3answers
633 views

My password can log me in, but nothing else (“user is not in the sudoers file” error when I try)

I recently got a new user account for Ubuntu 12.04 on Linux after becoming unable to log in to one of my earlier accounts. I can log in to this account easily enough, but when I try to use the ...
5
votes
1answer
1k views

What does this code do if entered in a terminal?

sudo add-apt-repository ppa:langdalepl/gvfs-mtp sudo apt-get update Then, launch Software Updater (previously known as Update Manager) and install the available updates. After you update everything ...
5
votes
1answer
2k views

“Permission denied” error when editing /etc/ld.so.conf

When I run this command it fails: sudo echo '/usr/local/lib' >> /etc/ld.so.conf bash: /etc/ld.so.conf: Permission denied I don't have any problem running sudo for other tasks. I am using ...
5
votes
1answer
3k views

I accidentally removed myself from sudoers, how can I fix this? [duplicate]

I have one admin account and recently I have accidentally added myself to a single group (usermod -G without -a). So, I am not in the sudoers file any more. However, it is not possible to log in to ...
5
votes
2answers
15k views

How do I become a “superuser”?

The following command fails with an error: $ dpkg -i libmotif*i386.deb dpkg: error: requested operation requires superuser privilege How do I become a superuser? I thought I was the superuser?
5
votes
3answers
20k views

Password not working for sudo (“Authentication failure”)

Before I mention anything further, DO NOT give me a response saying that terminal won't show password input. I'm AWARE of that. I'm typing my user password in (not a capslock issue), and for some ...
5
votes
3answers
177 views

How to do a sudo verification that lasts long enough for (unprivileged) make to finish?

I often use the following construct for building and installing a tarball: sudo -v && make && sudo make install which will allow me to enter my password immediately and have ...
5
votes
2answers
450 views

How to prevent users from installing non-free software?

Is it possible to disable installation of non-free or proprietary softwares and applications in Ubuntu?
5
votes
3answers
5k views

Some programs not found when used with sudo

I just installed go to /usr/local/go, and in ~/.bashrc added this line: export PATH=$PATH:/usr/local/go/bin Now go works from the command line, but sudo go gives me: $ sudo go sudo: go: command ...
5
votes
1answer
3k views

sudo: unable to stat /etc/sudoers: No such file or directory - File Exists

I am one of a few people managing a gaming server. The Server is currently running Ubuntu 14.04, which was installed just 3 weeks ago. Everything was running fine until a few days ago, we've had a ...
5
votes
2answers
5k views

How do I prevent git from requiring sudo on every git command

I created a directory /var/www to store my web apps clone in. When I initially cloned the app from github it required me to use sudo and every time I do a git pull it's requiring sudo. I'm running ...
5
votes
1answer
392 views

Where are unauthorized sudo attempts reported to

Where are unauthorized sudo attempts reported to? When you attempt to use sudo, and are not allowed, a message says that the attempt will be reported. Is this only reported in var/log/auth.log ? or ...
5
votes
2answers
306 views

What is the difference between sudo -i and sudo -s

I am new ubuntu user and found some people telling me to use sudo -i to get to root and others tell me to use sudo -s. What is the difference? Which one do I use and when?
5
votes
1answer
3k views

Authentication required to Mount a Device

Today I came across a very strange message when today i double click the drive WHICH HAS NTFS FORMAT it give me this message THAT AUTHENTICATION IS REQUIRED TO MOUNT A DEVICE I know with root user ...
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 ...
5
votes
1answer
830 views

Error when trying to run an app with sudo or gksudo

I'm not sure what happened. A few days ago I installed some updates and now i get an error whenever I try to run sudo nautilus. If I run gksudo nautilus it hangs for a few seconds then does nothing. ...
5
votes
1answer
248 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?
5
votes
2answers
2k 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 ...
5
votes
2answers
537 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 ...
4
votes
3answers
39k views

How to run applications as root?

I am having some strange issue with Kate and Kwrite. When I click on Open File, it crashes with segmentation fault. I am a complete newbie to Linux, and I think the issue is that I am not running ...
4
votes
7answers
54k views

How can I determine the sudo password? [duplicate]

What is the default password of the sudo? I visit some forums, it tells that the default password is password, but it doesn't work, how can I determine the password?
4
votes
2answers
141 views

I have 2 different GEdits?

When I load GEdit, it is different from sudo GEdit. Normal GEdit gives me Gtk warnings in the console, and ithas a different look. When I install plugins on either version, it doesn't reflect on the ...
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 ...
4
votes
1answer
12k views

sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0

Whenever I try to do anything at all that requires my password it returns this: u7ur7l3@ubuntu:~$ sudo sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 sudo: fatal error, unable to load plugins ...
4
votes
2answers
5k views

Difference between sudo rm -rf and rm -vf?

Recently I have seen one issue with a cache problem. The problem comes with broken hash and that could be fixed with sudo rm -rf /var/lib/apt/lists/* and sudo rm /var/lib/apt/lists/* -vf But I ...
4
votes
2answers
565 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 ...
4
votes
3answers
316 views

Will this sudo rule allow a user to update the system and nothing more?

I want to design a sudo rule that will allow the user ricardo to update the system using aptitude, but prevent him from using sudo to run any other command (he's a problem user). Are there any ...
4
votes
2answers
5k views

Why does sudo not add root's PATH with Ubuntu 12.04?

I've recently upgraded my server to Ubuntu Server 12.04. Previously it was running 11.04. Ever since then I've been having trouble carrying out root user commands through sudo. An example of this ...
4
votes
1answer
443 views

Why does the terminal not hold my root password for sudo? [duplicate]

I stopped using Ubuntu for a while (since 12.10) and recently came back to it. From what I remember, it used to only ask for the root password once for a terminal session (for sudo commands). Now it ...
4
votes
2answers
943 views

How can I change the default editor of the sudoedit command to be vim?

I'm trying to use sudoedit, but it keeps running the nano editor. My preferred editor is vim. How can I make it the default? Looking at the man page, man sudoedit, I've noticed the following: ...
4
votes
2answers
2k views

Standards accounts are able to get root access using sudo without password request

I have installed a particular software using the installer present using the command sudo ./install.sh. After the installation now all the accounts on my ubuntu laptop can gain root access by ...