sudo - Execute a command with superuser privileges.
1
vote
2answers
35 views
How do I set vim as the default editor when I sudo?
I'm working on a CentOS 5.9 machine, and I simply want to type
sudo vi somefile
and have my trusty vim with syntax highlighting, etc. This seems simple enough, but after many attempts, it's ...
1
vote
1answer
35 views
chmod and chown not working in sudo called script
Based on this Serverfault question, my git user has permission in sudoers to run a wrapper script to move files into my webroot with git.
Everything is working fine except for the chmod and chown ...
2
votes
1answer
37 views
Getting no tty present and no askpass program specified when using git over ssh
I'm trying to push a git commit from my laptop to my server but keep getting the following error message:
remote: sudo: no tty present and no askpass program specified
To ...
0
votes
0answers
40 views
Program which uses JVM cannot start without sudo
I have problem with program which uses InstallAnywhere installer on Ubuntu 12.04. When I start installation, following error occurs:
Extracting the installation resources from the installer ...
-1
votes
1answer
44 views
Where does sudo get the currently logged in username from?
When I tried to "sudo su" instead of "sudo su -" after having been logged in as root and su-ing to another user, it tries to sudo me as the new user, but via root...
When I type env, it shows still ...
0
votes
2answers
74 views
What does a sudo command do?
Being a unix noob, what does this command do?
$sudo /usr/bin/su -something
Is -something a password or username for running commands under this username?
0
votes
1answer
36 views
Where to configure which password sudo needs
on some OS sudo requires the users password, on others it's root's password.
Where is the config file to decide on this?
1
vote
2answers
29 views
The HOST variable in /etc/sudoers
suppose mymachine:/etc/sudoers includes the line
joe someremotehost = (ALL) NOPASSWD: ALL
but someremotehost:/etc/sudoers does not say anything special about joe, then what effect does the above ...
1
vote
2answers
43 views
Files created by 'make' aren't getting executable permissions by default
I'm trying to build a project, and when I use the command make, I get the following errors:
/bin/sh: line 4: .deps/ipset_bitmap_ipmac.Tpo: Permission denied
make[2]: *** [ipset_bitmap_ipmac.lo] Error ...
2
votes
5answers
96 views
Environment variable does not seem to work in sudo
I use apt behind a firewall, so I specify a proxy in the http_proxy environment variable.
What I have done is added the following line to both .profile and .bashrc (for good measure) of the root ...
1
vote
3answers
111 views
Using sudo in openSUSE without actually changing to root user (i.e., like in Ubuntu)
I recently started trying openSUSE 12.3 after having used Ubuntu for a few years. I'm still getting used to openSUSE's treatment of su (and sudo) vs. Ubuntu's use of sudo. I've been reading the ...
9
votes
4answers
596 views
Why doesn't “sudo su” in a shell script run the rest of the script as root?
A sample script can be as below:
#!/bin/bash
sudo su
ls /root
When using ./test.sh as the normal user, instead run ls as super user and exit, it switches to root; and when I logout, it executes ls ...
0
votes
2answers
43 views
Where are sudo incidents logged?
When someone is not in the sudoers group and try to use sudo, get an error message like this one:
yzT is not in the sudoers file. This incident will be reported.
I'm trying to figure out in which ...
0
votes
1answer
48 views
Don't execute a command with sudo, unless it's configured as password-free
I'm not sure if sudo supports so, I want to execute a command, only if this command is configured as NOPASSWD, that is, if the command can be run without password, run it; Otherwise quit directly.
So ...
2
votes
0answers
51 views
Auto completion for inaccessible directories
I'm trying to get a auto completion for folders that I don't have permission to view / enter, my first thought was to use compgen and sudo to do the completion manually, but looks like compgen is a ...