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)

26
votes
4answers
11k views

How to get out of “sudo -s” command in Terminal?

I entered sudo -s command in terminal, and the it changed from shameek@shameek-K55VD:~$ to root@shameek-K55VD:~#. Now when I click on the close terminal window icon it says, "There is still ...
0
votes
2answers
1k views

What is the answer to “are you root” when installing packages? [duplicate]

What is the answer to "are you root" in Ubuntu 12.10. I was installing the restricted extras for the 12.10 when I got this message after typing my password. I typed yes and now all I see are y in the ...
1
vote
1answer
1k views

Running a program as another user without typing a password

I'm trying to mark my browser internet traffic with a DSCP by selecting the packages with a certain owner. In order to do that I have to start my browser with a dummy user. I start my browser by ...
1
vote
2answers
9k views

Unable to install xampp in ubuntu 13.04

I am installing xampp in ubuntu 13.04, but while installing the xampp.. when i try to extract the file .. it shows the following message sudo tar xvfz xampp-linux-1.8.1.tar.gz -C ...
0
votes
1answer
100 views

How to modify and give acces to user in sudo file

when I am trying to install vim using sudo apt-get install vim, its showing sudoers file error. Please help me out.
3
votes
2answers
3k views

Won't execute terminal commands

I have been using Ubuntu 12.04 for quite a while and have never had a problem come at me out of the blue like this. I'm trying to install python 3.2 on my Ubuntu system and every time I run the code ...
4
votes
2answers
1k 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 ...
0
votes
2answers
52 views

New User - Installing Applications ie Android SDK - Where To ? ( Equivalent of Program Files ? )

it is taking me some time to find my way around Ubuntu and while I know I can Sudo an App like PCManFM to create directories I do not know where the best place to create a folder for the Android SDK ( ...
0
votes
1answer
43 views

Having issue with creating a script

Trying to create a simple script but I'm not having any luck. I created a file with nano, saved it. Then: sudo chmod +x filename The script is: #!/bin/bash #script to restart networking after ...
2
votes
1answer
103 views

How to clean up aftermath from rookie ubuntu command

Here are the commands I regretfully run: sudo chgrp root /usr/bin sudo chgrp root /usr/local I had recently added a user to root group and because my user still did not have write permissions, I ...
5
votes
1answer
9k 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.
0
votes
1answer
1k views

Cannot create a new document in /var/www [duplicate]

I'm unable to create a new document in /var/www/ I followed this tutorial :- How to avoid using sudo when working in /var/www? and did as suggested, but still I'm unable to make a new document. Any ...
14
votes
3answers
83k views

Sudoers file, enable NOPASSWD for user, all commands

Preface This is a fairly complex question related to the Sudoers file and the sudo command in general. NOTE: I have made these changes on a dedicated machine running Ubuntu Desktop 13.04, that I use ...
2
votes
1answer
127 views

Why my gnome terminal is set to root by default?

When I try to open up a new terminal in Ubuntu to do some operations, it always defaults to an admin based terminal with [sudo] password for xxxxxxxx: $ I need a regular terminal. How do I do this? I ...
0
votes
0answers
25 views

How to get back root access? (Rootrechte bekommen?) [duplicate]

Translation: I use Xubuntu and have deleted my Admin Account. After I had created a new one which also had administrative rights. I did that becauseof some sound problems which are now gone. Now the ...
0
votes
1answer
101 views

sudoing my own bash scripting

Okay, so I have my scripts in ~/bin/, and they are added to the path normally. However, when I prefix them with sudo, they are not in the path. I figure this is because they're not in the path for ...
2
votes
1answer
345 views

Difference between running command as sudo and running command as root?

I know this question has been covered in many contexts but I'm unable to understand and predict when a user added to the sudoers file will not have permission to do something when prepending sudo to a ...
15
votes
4answers
4k views

What is the functional difference between sudo su and sudo -i?

Why is one preferred over the other in this example? sudo su echo "options iwlwifi 11n_disable=1" >> /etc/modprobe.d/iwlwifi.conf exit Please provide links to Ubuntu documentation.
0
votes
1answer
513 views

.sh file is not running changing directory command

my contents of .sh file are sudo -i cd /home/madhu131313/Documents/ I run it ,then it asked for root password, it changed to root, but it doesn't execute the changing directory
0
votes
3answers
4k views

sudo pecl command not found

I'm using ubuntu 12.04 I installed php pear using this command sudo apt-get install php-pear php5-dev I got this results Reading package lists... Done Building dependency tree Reading ...
3
votes
1answer
164 views

su not properly logged when using byobu [closed]

We're seeing varations in our logs when a user su's from a byobu session vs. a regular shell session. When using a regular session the lines in /var/log/auth.log look like this: root@delta:/var/log# ...
1
vote
1answer
693 views

cannot start graphical programs with sudo

i have a fresh ubuntu 12.04 installation with encrypted home partition. i copied over my home folder from another computer. when i try to launch graphical programs via sudo i get errors like the ...
0
votes
2answers
1k views

Sudo hangs without prompting for password

I just did a fresh install of Ubuntu and now when I try to use sudo in the terminal emulator, it just hangs there without even asking me for a password. If I switch to the terminal (Ctrl + Alt + F1) ...
0
votes
1answer
1k views

Run a Python Script on Login with Sudo

I am setting up a machine that's sole purpose is to run a specific python application that uses a curses ui. That being said, there are some aspects of the application that require it to be run as su. ...
0
votes
1answer
2k views

What actually yum does? [closed]

I've seen that yum command for Cento OS Red Hat Linux platform. But, I tried with sudo too and it was works. I want to know then what yum actually does? I am just qurious to know?
1
vote
2answers
843 views

How can I delete everything off of my SSD hard drive, or namely the grub loader?

I'm currently using a live CD and I am attempting to delete everything off of my harddrive. So, I've used the command sudo nautilus and attempted to delete everything off of my SSD. However, I cannot ...
9
votes
1answer
2k views

How to make 'sudo' grab the password from a file?

I want to run a command that requires the sudo password say: sudo apt-get update Isn't this supposed to work (I have stored the password in a normal text file passwd.txt): sudo apt-get update ...
2
votes
2answers
2k views

edit text file with sudo via ssh and script

I want to modify /etc/hosts (and later also hostname) via a script and ssh. So I'm logged in via ssh and this works: sudo nano /etc/hosts It shows the remote hosts file in nano. However I was ...
2
votes
2answers
2k views

I can't find my user password or change it

In the terminal, whenever I try to perform sudo, Ubuntu asks my password and it always says I typed it in wrong. I tried changing the password as root, but then it says password unchanged. My user ...
2
votes
1answer
663 views

Why are my LDAP logins slow?

I have been running this server with LDAP for about 6 months. The logins have always been fast. However, starting this week logins are taking 1-2 minutes to complete. This include ssh, sudo su, and ...
1
vote
2answers
5k views

“dpkg: error: requested operation requires superuser privilege”. Cannot remove all configuration info from removed packages, sudo doesn't work

I want to run this command (see section 4 from here https://help.ubuntu.com/community/AptGet/Howto#Removal_commands): dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge I use sudo at the ...
1
vote
4answers
10k views

What is 'sudo tar -xzf'? Why it is used?

I need to know the extensions of xzf and its usage. Is it necessarily to be used in installing a software? sudo tar -xzf utorrent-server-3.0-ubuntu-10.10-27079.tar.gz Why this is used?
0
votes
1answer
113 views

Is it possible than my user disappears from sudo?

That happened after I managed to install Virtual Box. I found a part of the answer here : http://ubuntuforums.org/showthread.php?t=1376802. I added my user to another group and then lost my user to ...
1
vote
3answers
259 views

Not able to run sudo apt-get update in 12.10

I am trying to run sudo apt-get update but getting below mentioned error .. do you think there is any issue with Ubuntu's installation? E: Could not get lock /var/lib/dpkg/lock - open (11: Resource ...
1
vote
1answer
538 views

Upstart - Bluepill not starting without sudo

I have an upstart service to start bluepill (Ruby gem to monitor processes). The upstart config is below. description "Start up the bluepill service" start on runlevel [2] stop on runlevel [016] ...
0
votes
1answer
3k views

Some index files failed to download [duplicate]

When I ran sudo apt-get update then I found some error. The Error is like below: W: Failed to fetch cdrom://Ubuntu 13.04 _Raring Ringtail_ - Release amd64 ...
1
vote
1answer
325 views

Trying to undo some commands

I have done the following commands trying to make Ubuntu work faster: echo 100 > /proc/sys/vm/overcommit_ratio echo 2 > /proc/sys/vm/overcommit_memory #/etc/sysctl.conf прописываем: ...
0
votes
1answer
39 views

How can I tell my laptop to shutodwn after finishing running a non-root process

I'd like to be able to say: ./run_process.sh; sudo shutdown -P now but the call to sudo will ask for my password and then my laptop won't shut down because it's waiting for my password. How can I ...
0
votes
3answers
206 views

lost sudo privileges through renaming an essential folder

This was stupid of me, but now I can't fix it. I changed the name of /usr/lib to /usr/lib64 not realizing that the sudoers.so file was in this folder. Now I can only log in in recovery and I have ...
0
votes
1answer
267 views

How do I execute a sudo command without a password?

I have a simple shell script that uses the killall command. I would like to run this command without needing to enter my password. I've brought up visudo and inserted the following line into it: ...
1
vote
1answer
132 views

How do I perform a backup of sudoers file?

After reading the following two posts: Trying to install an openVPN GUI messed up sudoers Standards accounts are able to get root access using sudo without password request I would like to learn ...
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 ...
1
vote
1answer
2k views

I need to use sudo for any Hadoop operation, how to change permissions?

I am self learning Hadoop, starting yesterday. For the purpose of learning, I have set up Ubuntu 13.04 64-bit on VMWare Fusion on my MacBook Pro. And I am following this excellent tutorial. Before ...
2
votes
2answers
1k views

How can I run sudo gedit as gksu gedit

I'm looking into ways of automatically loading Gedit as gksu gedit when I enter sudo gedit by mistake? I have found that I have made a number of files unreachable by using gedit and I have only just ...
2
votes
2answers
5k views

Proper way to let user enter password for a bash script using only the GUI (with the terminal hidden)

I have made a bash script that uses kdialog exclusively for interacting with the user. It is launched from a ".desktop" file so the user never sees the terminal. It looks 100% like a GUI app (even ...
2
votes
0answers
69 views

Why is pkexec preferred over gksudo for graphical applications? [duplicate]

Please provide Ubuntu documentation that refutes this: https://help.ubuntu.com/community/RootSudo Why, on my fully updated 13.04 system, does pkexec not function? $ pkexec gedit somefile.txt No ...
0
votes
1answer
353 views

Granting administrator privileges to user not working?

I saw the sudoers manual and plan to eventually give the user only rights to run specific programs, but tried testing it with ALL permissions and it isn't working. sudo -l shows this: [sudo] ...
0
votes
1answer
103 views

SU, SUDO and Upgrade problem

i have a big problem with my Ubuntu PC. When i try sometigng need sudo or su, nothing is working and the OS Upgrade too, when i write the root password to the su command i have a "autentication ...
0
votes
1answer
608 views

How to install vnc server so I can have complete control on my Ubuntu Server?

I installed ubuntu server 12.04. I installed gnome desktop on that (GUI essential for my purpose). Now I want to control the server remotely. I tried following things and not very successful : ...
1
vote
1answer
1k views

running gedit as sudo

I'm really new and from the dark side (Windows)... I must be doing something wrong. The only way I can get gedit to run with a tool bar (Save As etc.) is to launch it with sudo from a terminal. I ...