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)

5
votes
4answers
104k 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.
5
votes
2answers
1k views

How do I make a sudo command start at start-up with a 1 minute delay?

I would like to make a sudo command (sudo service smbd restart) run after 1 minute of being logged on. How would I go about doing this? P.S. This is a system with no monitor, mouse, keyboard or ...
5
votes
2answers
7k 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
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 ...
5
votes
2answers
6k views

How can I get an interactive shell as another non-root user?

I'm using Ubuntu 10.04 LTS server, with the default security model (root locked, using sudo to elevate privileges). I occasionally enjoy using sudo -i when I'll need to run a series of commands with ...
5
votes
2answers
19k 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
3answers
552 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
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
12k 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
18k 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
174 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
423 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
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 ...
5
votes
1answer
11k 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): ...
5
votes
1answer
326 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
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
648 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
236 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
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 ...
5
votes
2answers
529 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
32k 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
2answers
139 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
4answers
16k views

Sudo doesn't work

I edited my sudoers file in /etc and after that I can't use sudo anymore. I get this whenever I issue the command: sudo: >>> /etc/sudoers: syntax error near line 30 <<< sudo: parse ...
4
votes
5answers
6k 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
2answers
552 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
1answer
7k 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
3answers
274 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
34k 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 ...
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
335 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
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 ...
4
votes
1answer
5k 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 ...
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 ...
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 ...
4
votes
2answers
515 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
10k 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
552 views

What's the difference between root account and simulated roots?

So if I disable my root account with sudo passwd -dl root I still have access to sudo {su,bash} or sudo -{s,i} conceptually how are the elavated rights different from the root account? I know the ...
4
votes
1answer
2k 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?
4
votes
1answer
5k views

/etc/environment and /etc/profile.d/* ignored for the root user [duplicate]

How do I set global environment variables in Ubuntu, in such a way, that they would apply also to root user? Setting PATH or JAVA_HOME in /etc/environment or in /etc/profile.d/my_settings.sh both ...
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 ...
4
votes
5answers
8k 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?
4
votes
1answer
5k views

sudo does not ask for password [duplicate]

Whenever I issue command sudo apt-get install foo it does not ask for password. is it because of user groups? How to make it prompt for password? Edit: My sudoers file apple@Ascension:~$ sudo cat ...
4
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 ...
4
votes
2answers
883 views

Why doesn't $HOME change if I use sudo?

I expected the -H option to give me the target user's environment. nbest@geo:~$ sudo -H -u tanum echo $HOME /home/nbest nbest@geo:~$ sudo -u tanum echo $HOME /home/nbest nbest@geo:~$ sudo -i -u ...
4
votes
3answers
15k 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 ...
4
votes
4answers
396 views

How can I prevent a user from changing their password? [duplicate]

I want to prevent a user from changing their own password. Additionally, if possible, I want to prevent them from changing it via sudo.
4
votes
3answers
4k views

I cannot delete files from root's Trash

I deleted some large files from nautilus launched as sudo. They still show in /home/.Trash-0/files/<foldername> when I type sudo sh -c "du -h /home | grep -P '[0-9]G\t'" but when I type sudo rm ...