sudo - Execute a command with superuser privileges.
0
votes
2answers
35 views
TAB autocomplete on sudo sh
When I say sudo sh, TAB stops working as autocomplete signal on my Debian.
How can I enable TAB key autocomplete after I say sudo sh ?
-1
votes
1answer
34 views
disabling root permissions [closed]
From Linux From Scratch build a minimal system for running my application. but struck on disabling root permission.
Need my minimal lfs as ubuntu.
when ubuntu boots login-screen displays when we ...
1
vote
0answers
60 views
how to run ssh -t user@remote 'sudo nohup bash -c “comand”' in background
I want to run a script on a remote host with sudo priviledge,
someone suggests that I should use nohup and ssh -t, like the following command
the script ls;sleep 10;echo finish is crafted here to ...
4
votes
1answer
43 views
when timing a command execution time with sudo, `time` should be before `sudo` or after `sudo`?
when timing a command execution time with sudo, time should be before sudo or after sudo?
time sudo command
or
sudo time command
which one is correct?
the output seems very different to me
...
0
votes
1answer
33 views
Difference between sudo su - user and sudo -iu user [duplicate]
I was wondering if there were any difference (in environment ?) between doing
sudo su - user
and
sudo -iu user
From what I know:
By using
sudo su - user
I open a new shell as user, and the ...
0
votes
3answers
39 views
How to limit administrative privileges to various config files?
I want one administrator to be able to edit the /etc/fstab file but one administrator to not be able to edit the fstab file.
Both administrators need access to all other administrative tasks.
Is ...
1
vote
2answers
53 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
60 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
103 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 ...
-1
votes
1answer
58 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
86 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
43 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
34 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
49 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
114 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
200 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
718 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
45 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
52 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 ...
3
votes
0answers
59 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 ...
1
vote
2answers
110 views
Linux (RedHat) `sudo su -l <<user_acct>>` does not source profile
As stated, having trouble with loading the default profile of <<user_acct>> when doing sudo su -l <<user_acct>>.
Inside .profile,
if [ -r "${HOME}/.profile.custom" ]; then
...
1
vote
5answers
272 views
How to securely automate running commands as root with “sudo su -”?
hint (on client side, how to encrypt files/pwd's):
# encrypt pwd with ssh key:
openssl rsa -in ~/.ssh/id_rsa -outform pem > ~/.ssh/TEMP-id_rsa.pem 2>/dev/null
openssl rsa -in ~/.ssh/id_rsa ...
2
votes
1answer
102 views
No valid sudoers sources
I've gone through the Google searches, but the results always have an extra clue that I'm not seeing. The error:
[testuser@testhost] $ sudo -ll
sudo: no valid sudoers sources found, quitting
sudo: ...
2
votes
0answers
53 views
/proc/net/wireless does not show values unless run as root
cat /proc/net/wireless does not show statistics for wireless devices unless it is run as root, even though the permissions on the file are 444. The same seems to apply when accessing statistics via ...
3
votes
1answer
73 views
How does having /dev/fd make running shell scripts under sudo safe?
At the end of the man page for sudo, there's the following remark:
Running shell scripts via sudo can expose the same kernel bugs that
make setuid shell scripts unsafe on some operating systems ...
2
votes
2answers
462 views
How to add self to sudoers list?
I've added myself into the sudoers users list by using the command
root@debian:/home/oshirowanen#adduser oshirowanen sudo
If I try to run that command again,
root@debian:/home/oshirowanen# ...
0
votes
1answer
142 views
Masquerading as another user from sudoers file?
My /etc/sudoers file has following entries:-
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
agupta ALL= /sbin/,/usr/sbin/,/bin/,/bin/cat /etc/sudoers
ADMINS ALL= !/usr/bin/su, ...
3
votes
1answer
65 views
Redirecting output in the shell, permissions
I have a question about permissions.
Distro: Debian GNU/Linux 6.0.4 (squeeze)
So I have a folder with a php script in it. Both folder and file are owned by User1
If I do this:
php script.php
I ...
0
votes
3answers
98 views
What does sudo su work but su does not? [duplicate]
I have tried this on Fedora and on Ubuntu.
kshitiz@kshitiz:~$su
su: Authentication failure
kshitiz@kshitiz:~$sudo su
root@kshitiz:/home/kshitiz#
I am entering the same password in both the cases.
...
0
votes
2answers
281 views
sudo: password prompted even when NOPASSWD is set [duplicate]
~/bin$ cat setbrightness
id
echo $1 > /sys/class/backlight/intel_backlight/brightness
~/bin$ whoami
rag
~/bin$ sudo -l
Matching Defaults entries for rag on this host:
env_reset, ...
1
vote
2answers
101 views
What is the difference between gksu and sudo?
I presume this applies to any Gnome desktop. What is the difference between these two commands? According to the Ubuntu documentation and questions that reference it, the former also sets the $HOME ...
0
votes
2answers
126 views
Changing root password does not change sudo password
I'm trying to change the password that get's asked when doing sudo.
I'm in Ubuntu.
Doing 'sudo passwd' or 'sudo passwd root' does give me the two new password questions, and it successfully changes ...
2
votes
2answers
116 views
Does the sudo user need a home directory?
In my setup, my aim is to have
A standard user with minimal permissions to use on a daily basis
A superuser account, defined in /etc/sudoers.
Does this second user need a home directory? Both of ...
1
vote
2answers
87 views
run a command as different user with available sudo permissions
I want to run the below command
echo 1000 > /sys/class/backlight/intel_backlight/brightness
i cannot do it it like below beecause bash is the process that actually directs output to the ...
2
votes
1answer
399 views
Is it okay to disable requiretty?
I'm trying to set up a deploy script using Capistrano At a step cap deploy:setup script is connecting to my server and trying to run commands that create directories. Then I see an error: msudo: ...
1
vote
1answer
107 views
Setting the root password vs. sudo -i
Should one always set a root password, or is sudo -i acceptable? Two problems is in reading other posts (maybe junk I realize):
sudo -i eliminates the need for a password. Isn't that a problem for ...
2
votes
1answer
49 views
Using sudo to give access to another account on same machine
There are two unix accounts A and B.I want to execute a unix command from account B such that the command behaves as if it was executed from account A .How can I do this ?
The problem here is that ...
2
votes
4answers
177 views
Should I use `sudo` or `su` in a startup script?
I have a personal program, that has a server/client design.
The server daemon part of it, should be run as its own limited user, and the program was not designed to drop its root privileges (if ...
1
vote
1answer
99 views
Cannot enter in centOS with any user
I am using cent OS Operating system without GNOME.
In the starting, it asks
localhost login:
Password:
It has one user named service under group name service whose password is also service.
I ...
1
vote
0answers
62 views
External HDD read/write permission changing from a cron job
So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
3
votes
1answer
2k views
Suddenly, I Can't login with correct password (greeter & tty)
This might be a duplicate of other password related questions but it's somehow eccentric.
I have 3 accounts in my Ubuntu 12.10 system (one standard and two administrators). One of the administrator ...
1
vote
0answers
98 views
git deploy using sudo nopasswd
I'm trying to write simple post-recieve script, which would switch to webserver user and pull git repository. To do so, I added git user to sudoers (I've added this to very last line):
git ALL = ...
0
votes
1answer
138 views
Apt-get, no sudoers file
I am trying to install a module using apt-get.
I do the following:
sudo apt-get install
But I get the following error:
sudo: can't stat /etc/sudoers: No such file or directory
sudo: no valid sudoers ...
1
vote
2answers
71 views
how to require sudo to view files?
I have a ssh server. I allow people to connect to it if they want. I do my programming homework on it. I am in trouble with my teacher because people were cheating off it. I need to know how to ...
0
votes
1answer
118 views
Execute John the Ripper on multiple processors using mpirun
I am a linux noob trying to optimize John the Ripper for a security class. I am trying to use both processors to run John by using the mpirun program as suggested in this tutorial. I installed mpirun, ...
2
votes
1answer
493 views
Can't use su or sudo on Arch Linux
Sudo returns this error:
sudo: effective uid is not 0, is sudo installed setuid root?
And su - returns this:
su: Authentication failure
The user I'm using is a member of the following groups:
...
1
vote
0answers
115 views
Bodhi Issue with Nautilus as SU
I am unsure how to run Nautilus with superuser privilieges on Bodhi, or if this is just a bad idea altogether. I am looking for a file manager that can browse my local network, and can be run as ...
2
votes
1answer
130 views
sudo hangs indefinitely without prompting for password
When I logged back into my Ubuntu desktop after an update, my display driver was seemingly unavailable and I was met with vt-7's output. I changed to a different terminal and logged in. However, when ...
4
votes
2answers
138 views
How to automaticaly enter sudo's grace period upon login
Knowing that giving a user a sudo's grace period right from the point when he/she login might be a security issue, I still think it will be a beneficial trade-off between security and usability in my ...
0
votes
0answers
43 views
Root user can't do everything? [duplicate]
Possible Duplicate:
Redirecting stdout to a file you don’t have write permission on
I'm quite new to Linux and I have a permissions questions. I'm using Linux Mint.
If I go to /opt and do ...