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)

3
votes
2answers
239 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
41 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
37 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
75 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 ...
2
votes
1answer
969 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
466 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 ...
0
votes
0answers
24 views

error while trying to run sudo apt-get update [duplicate]

I am using ubuntu 12.04 and am getting error message while try to run sudo apt-get update. This is what I am getting when i run the above mentioned command: failed to fetch ...
9
votes
2answers
23k 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
105 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
84 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
234 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 ...
12
votes
4answers
2k 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
354 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
0answers
85 views

Firefox wont download anything after running sudo optirun with it help please?

I am running on Ubuntu 12.04.1, Firefox 22. I recently ran "sudo optirun Firefox" the reason for this is because if I run that command YouTube/flash/html5 and other types of videos I watch only don't ...
0
votes
3answers
2k 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
111 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# ...
0
votes
1answer
442 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
0answers
20 views

Reeboot or Shutdown without Password [duplicate]

To run the command poweroff or reboot one needs to be super user. Is there anyway I can run this as a normal user? I just dont want to sudo and enter password everytime I reboot or poweroff.
0
votes
0answers
568 views

cannot install gnuplot in ubuntu 12.04

whenever I type sudo apt-get install gnuplot I get: Err http://in.archive.ubuntu.com/ubuntu/ precise/universe gnuplot-nox i386 4.4.3-0ubuntu3 Connection failed [IP: 91.189.92.200 80] 0% [Waiting for ...
0
votes
2answers
516 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
2answers
759 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
0answers
7 views

sudo apt-get install curl command not installing curl [duplicate]

I'm trying to install curl using the command: sudo apt-get install curl It shows me error saying E: Encountered a section with no Package: header E: Problem with MergeList ...
0
votes
1answer
667 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?
0
votes
0answers
139 views

Why doesn't this script work at startup?

I am trying to execute a script on startup: mount_hdd.sh #!/bin/bash exec > /tmp/debug.txt 2>&1 echo $USER sudo cryptsetup --key-file=/home/jeffrey/.scripts/passwd.txt luksOpen /dev/sdb1 ...
1
vote
2answers
497 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
703 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 ...
1
vote
2answers
972 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
1k 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
402 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
2k 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 ...
-2
votes
2answers
3k 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
62 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
215 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
377 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
2k 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
194 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
0answers
89 views

How to put root or administrator on Ubuntu 12.04

Ubuntu 12.04 on a flash memory, I changed my account from Administrator to Standard. Now I cannot do updates. How do I do updates or get it back as an administrator?
0
votes
1answer
33 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
125 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
238 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
66 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 ...
0
votes
0answers
143 views

First time using OpenVPN on Ubuntu

I am new to using Ubuntu and OpenVPN. Below are my questions: In Microsoft Windows, the files in the config folder have the file extension ovpn. I understand that in Ubuntu, I will have to change ...
4
votes
2answers
1k 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
960 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
847 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
3k 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
64 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
245 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
87 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 ...