Tagged Questions
0
votes
1answer
31 views
Run a shell script as another user that has no password
I would like to run a script from the main ubuntu shell as a different user that has no Password.
I have full sudo priviledges, so I tried this:
sudo su -c "Your command right here" -s /bin/sh ...
0
votes
1answer
45 views
Sudoers NOPASSWD for command not working but ALL is
I've been trying to grant www-data to use sudo service apache2 restart without a password but no matter what I try, nothing works. I have read a few hundred posts regarding this issue on different ...
2
votes
0answers
52 views
How to configure pkexec
Reading this question & answer When to use pkexec vs. gksu/gksudo? & Why is gksu no longer installed by default in Raring 13.04? brought me another one that will create problems for new users ...
1
vote
1answer
112 views
Can I write a python script that will automatically load a terminal as sudo?
I use sudo a lot and I am constantly having to restart my terminal (development of programs that froze usually) and it's a pain in the butt to constantly put in the sudo command and then my password. ...
0
votes
0answers
30 views
Why does sudo cd occasionally return command not found [duplicate]
When exploring my disk drive contents I noticed that from / cd root failed as did sudo cd root; the only way I was able to view the contents was sudo su, then cd root
Pete$ pwd
/
Pete$ cd root
bash: ...
3
votes
1answer
59 views
Bash - Get Sudoer Username?
Say I have the following bash script:
#!/bin/bash
echo $( whoami )
This is what it outputs with and without sudo:
alix@netbook:~$ ./test.sh
alix
alix@netbook:~$ sudo ./test.sh
root
The script ...
-1
votes
1answer
149 views
How do I get past a 'frozen' terminal with a sudo password prompt? [duplicate]
Possible Duplicate:
Nothing shows up in the terminal when I type my password
When running the Terminal and asked for password the terminal freezes - cannot type in or paste. What is the ...
4
votes
2answers
479 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?
4
votes
2answers
190 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 ...
2
votes
2answers
214 views
Does sudo really make you root for a while?
On Ubuntu, in what kind of situations, if any, running a command as a non-root to access a file/folder or create/delete a file/folder using sudo may result in "permission denied"
while running the ...
7
votes
1answer
468 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?
1
vote
1answer
160 views
sudo refuses my password
I've just installed Ubuntu 12.04 and now that I want to install a program through the terminal with a command starting with sudo, the terminal says Sorry, try again.
I just don't get it, this is my ...
0
votes
1answer
656 views
Problem bash completion apt-get 12.10
I've got an annoying problem with completion and sudo apt-get.
To give an example:
$ sudo apt-get in[Tab][Tab]
in intel_bios_reader
includeres ...
1
vote
2answers
290 views
Beginning with shell scripting
I am fresh into Ubuntu and one of my goals is shell scripting for personal (and maybe public) use.
I'm a novice, though I do understand some of the basics (e.g. what a variable, string, loop, etc... ...
1
vote
3answers
2k views
Best practices for using 'sudo su'
I have been using the terminal for a while now and sometimes (actually, a lot of times) I use a command, like:
cp /etc/test ~/testFolder/
and I get this error:
cp: cannot open `/etc/test` for ...
2
votes
3answers
108 views
How to copy all .sol files in a system to a specific folder
I want to copy all the files that I have in the system with extension sol to the specific folder
can you please help me.
I tried sudo cp / *.sol ~/SOL/
but it doesn't work
UPDATED:
I tried to follow ...
0
votes
2answers
2k views
What are some of the basic sudo commands?
I am looking to learn sudo commands for the GNOME terminal.
I am an avid user of Ubuntu however I'd like very much to learn as many commands and shortcuts as possible. I am running Ubuntu 12.04 32 ...
4
votes
2answers
624 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 ...
0
votes
1answer
170 views
How to execute a executable with sudo?
I have an executable file but don't know what type or format it is. When I execute like this
$chmod +x xfile
$./xfile
It shows
Permission denied
when I run as super user
$sudo ./xfile
It ...
2
votes
1answer
102 views
How can I make my system usable after modifying /usr/share/icons's permissions?
I'm running a duel boot/partition machine with Ubuntu 12.04 and Windows 7. On Ubuntu OS, I wanted to change the permissions in one of my directories so could extract files into that directory. In the ...
6
votes
2answers
3k views
Shutdown from terminal without entering password?
I have desktop edition of Ubuntu.
I like the Terminal so that that I prefer to shutdown my computer with the shutdown command.
However when I type shutdown now it prompts me to enter my password.Is ...
0
votes
1answer
175 views
When I run sudo lshw in terminal, it asks for my administrator password, but it won't accept keyboard input when I try to type? [duplicate]
Possible Duplicate:
Nothing shows up on the screen when I type my password
I have been trying to run [sudo lshw] but it asks [password for grace: [] ]
So when I try to type my password, it ...
40
votes
4answers
20k views
How do I sudo a command in a script without being asked for a password?
I want to turn my system on automatically every day. So I use the below code in my Python script, but sudo asks me for a password every time:
os.system('sudo sh -c "echo date \'+%s\' -d \'+ \
...
1
vote
2answers
1k views
no sudo permissions to /etc/hostname
When I try to edit my /etc/hostname file, using sudo nano /etc/hostname (or any other editor) I get the following:
Error writing /etc/hostname: Permission denied
I then tried:
sudo chmod u+w ...
3
votes
6answers
7k 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 ...
1
vote
3answers
202 views
Can I automate updating/upgrading with sudo in this way?
Please consider this code:
alias fast='echo "password" | sudo -S apt-get update && sudo -S apt-get upgrade'
I have not yet had a problem using it but is it possible that if the first step, ...
14
votes
3answers
12k views
Execute sudo without Password?
Inspired by this question....
I am the sole person using my system with 12.04.
Every time I issue a sudo command; the system asks for the user password (which is good in its own way).
However I was ...
1
vote
2answers
1k views
How do I run an executable file with a double click?
I'm trying to run an executable (testdisk) but double click doesn't work. The only way is to run:
sudo ./testdisk
from terminal. But I'd like to open executables with double click in future. How ...
4
votes
1answer
3k 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:~$ ...
0
votes
2answers
2k views
sudo in the Terminal seems not to accept password input [duplicate]
Possible Duplicate:
Nothing shows up on the screen when I type my password
I upgraded to Ubuntu 12.04 LTS and was trying to update software with sudo apt-get .... In the Terminal I am asked ...
2
votes
3answers
4k views
I cannot enter my password when using sudo to install Sophos AV for Linux
I cannot type my password as shown below. After successfully unlocking root account in Ubuntu 12.04 LTS.
saintmichael@ubuntu:~$ sudo
usage: sudo [-D level] -h | -K | -k | -V
usage: sudo -v [-AknS] ...
3
votes
2answers
2k 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 ...
0
votes
2answers
3k views
sudo ./ : command not found
http://youtu.be/8oYTrf9jnGk for a video i made of it in action.
N.B. - I have my nvidia .run file on my desktop - I double click it, and it appears to run but stops asking for sudo permissions.
So ...
3
votes
1answer
1k views
Cannot echo “hello” > x.txt even with sudo? [duplicate]
Possible Duplicate:
sudo & redirect output
I'm trying to create a file in /var/www, but even with sudo this fails:
user@debVirtual:/var/www$ sudo echo "hello" > f.txt
-bash: f.txt: ...
2
votes
1answer
272 views
Problem accessing superuser with sudo
Through Virtualbox didn't allow me use USB because my account wasn't a vboxuser group, I've to run this command:
$sudo usermod -G vboxusers brallan
After I needed to access to superuser privileges ...
3
votes
2answers
5k views
I cannot enter my password in the terminal - can't install packages [duplicate]
Possible Duplicate:
Nothing shows up on the screen when I type my password
I can open a terminal (Ctrl-Alt-T)
I can copy or type in the following:
sudo wget ...
3
votes
1answer
897 views
Terminal problems entering password
Every time I try to enable shell theme extension or anything in general in Terminal it asks me for a password but won't accept it.
4
votes
2answers
14k views
I want to copy a directory from one place to another via the command line
I want to copy a directory from one place to another folder.
sudo cp is the command, but after that what should I type? The destination or source first?
2
votes
2answers
4k views
Call a shell script from PHP, run as root
I'm running ubuntu 11.10. I want to be able to call a shell script from php and run that script as root. When my php attempts to call the shell script as root --like this:
$output = shell_exec('sudo ...
3
votes
1answer
2k 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 ...
2
votes
1answer
6k views
How to uninstall Ubuntu Software Center in 11.10? [duplicate]
I am trying to uninstall software center for ubuntu oneric using the command sudo apt-get remove software center and get this as result
Reading package lists... Done
Building dependency tree
...
7
votes
2answers
4k views
Environment variables when run with 'sudo'
As example to my question, my ~/.bashrc file contains this lines:
> export LD_LIBRARY_PATH=/opt/intel/mkl/lib/ia32:$LD_LIBRARY_PATH
> export LD_PRELOAD=/opt/intel/mkl/lib/ia32/libmkl_core.so
...
3
votes
1answer
229 views
Why does a command work from shell, but not from the applications menu?
I'm trying to add a command to my applications menu:
But when I select it from the applications menu, it doesn't do anything.
When I run that same command from the shell, however, it runs fine. ...
6
votes
1answer
644 views
Why should I use gksudo for Gtk apps instead of sudo?
I read somewhere that people should use gksudo for applications that use the Gtk GUI instead of sudo? What's the reasoning for this?
8
votes
4answers
1k views
Why does echoing these parameters with sudo not work? [duplicate]
Possible Duplicate:
sudo & redirect output
These are suggestions given by powertop to save energy:
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 1 > ...
2
votes
1answer
3k 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 ...
8
votes
2answers
8k views
Disable sudo permission to user from command line
I have activated root user in ubuntu and want to use ubuntu as server with no DE. For this I want to disable sudo privilege given to first user. How can I do this from command line ? I know I can use ...
2
votes
2answers
169 views
Looking for a log thats bound to sudo
I've issued the commands sudo su, and sudo sh. Can you please tell me if there are logs associated with sudo, and where I could find them?
1
vote
1answer
154 views
How to detect another sudo process?
Whenever a command is "unable to lock the administration directory", is there any way to easily detect what process is running that is using sudo?
10
votes
3answers
2k 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 ...

