sudo - Execute a command with superuser privileges.
0
votes
0answers
23 views
sudo su vs sudo ui issues
Have a strange question.
sudo su - runs fine but sudo -ui fails.
What is wrong??
[[email protected] ~]$ sudo -u oracle -i
[sudo] password for aaa.aaa:
Sorry, user aaa.aaa is not allowed to execute '...
1
vote
2answers
26 views
How to use sudo -i in a shell script
Is it possible to use sudo -i in a shell script? I think the exit command will run into problems...
#!/bin/bash
sudo -i
curl -L https://github.com/docker/compose/releases/download/1.10.0-rc2/docker-...
0
votes
1answer
15 views
mono-xamarin.list Type 'sudo' is not known
Yesterday I installed monodevelop, had to write something in c#. It didn't (I couldn't build and run code) even worked, but fked everything, that I can't even install anything, can't type sudo, enter ...
-1
votes
2answers
51 views
How can disallow su -
I am a system administrator and I do not want users to use su - $appuser and try entering the password of the app user
rather
use sudo su - $appuser and enter their own password.
Some naïve ...
6
votes
3answers
351 views
How to export variable for use with sudo?
On Slackware, using sbopkg permits one to build a package from source. Repos is not big as Debian, but it's nice.
Some software can use environment variables,
for example on the VICE c64 emulator, if ...
1
vote
1answer
20 views
How to write to /sys/ with a script after rebooting? (sudo)
I'm trying to write to /sys/class/backlight/intel_backlight/brightness and read from /sys/class/backlight/intel_backlight/max_brightness from a script I wrote. The problem is it requires root, and ...
1
vote
1answer
32 views
How can I set sudo to only give one try?
For example, if I type, sudo synaptic and enter a wrong password, I get 3 tries to get it right. I want sudo to only give me 1 try and exit with error code 1 if the password is incorrect.
2
votes
1answer
30 views
mac terminal - how to make a directory require SUDO access to delete it?
I have a directory called "development" and I want to set its permissions I guess, in a way that if someone where to run rm -rf development it would prompt for sudo access or just deny the command, ...
1
vote
2answers
60 views
Sudo - DNS Lookup ( tcpdump )
I noticed that when I type sudo SomeCommand it hangs for a little. I started trying to figure out what was going on found one very strange thing:
when I type tcpdump -i wlan0 and then do sudo, I get ...
0
votes
1answer
25 views
linux + write syntax in visudo
Nplt user not have the permission to run the command crontab -l
so I add this lines in visudo
Nplt ALL=(root) NOPASSWD: crontab -l
but I get this error
isudo: >>> /etc/sudoers: syntax ...
1
vote
1answer
47 views
ubuntu + add root permission for new user account
I have ubuntu version - 12.04
and this is the sudoers file
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# ...
0
votes
1answer
32 views
Can a program run by a NOPASSWD sudoer use sudo to gain root access?
If my user account is a NOPASSWD sudoer, does that mean any program I run can effectively gain root access by using sudo?
I noticed the default user on Raspbian is a NOPASSWD sudoer, and so I've been ...
0
votes
1answer
19 views
Grant group A's members 'sudo su' access to group B's user accounts
Assume I have a collection of unprivileged users (user01, user02, user03, ...) who are members of a Linux security group called 'x_users':
$ groups user01
user01 : user01 x_users
Further, assume I ...
1
vote
1answer
56 views
Can't use sudo when logging in through ssh [closed]
What is going wrong? When I log in using ssh, I am unable to use sudo:
$ ssh localhost
Last login: Tue Jan 3 15:59:29 2017 from fd5e:fcf3:b885:10::175
[alan-sysop@volcano ~]$ sudo ls
[sudo] ...
-2
votes
0answers
139 views
How to resolve “No protocol specified Unable to init server: Could not connect: Connection refused”?
I installed arch Linux last night. Now I don't understand why I can't run GUI applications like gedit, .etc from a terminal.
[vaibhav@linux ~]$ sudo gedit
[sudo] password for vaibhav:
No protocol ...
3
votes
1answer
30 views
Failed getting release file while running debootstrap with sudo
If I run debootstrap in with sudo I get the following output:
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
E: Failed getting release file http://de.archive.ubuntu....
4
votes
1answer
232 views
changing user home directory has no effect
When I switch from root user to a user (automatically created when installing git-auto-deploy) with
sudo -u git-auto-deploy /bin/bash I always get this error:
bash: /root/.bashrc: Permission ...
-1
votes
1answer
43 views
Does `sudo` work in terms of changing the effective user and group IDs of a process?
Does sudo give the root's power to a command by changing the effective user and group IDs of the process of the command to be root?
If not, how does sudo work to accomplish that?
15
votes
4answers
3k views
'sudo' is not installed, I can't install it, and it asks if I am root
I just finished installing Debian 8 (Jessie) and tried to make a directory in lib/firmware, because there was a file missing (rtl8723befw.bin) in the installation, and it says
mkdir: cannot create ...
0
votes
0answers
27 views
Cannot run sudo twice
I have the following statement in bacula:
RunBeforeJob = "sudo /bin/mountpoint /backup/external || sudo /bin/mount /dev/mapper/bacula"
But it fails:
sudo: pam_unix(sudo:auth): conversation failed
...
0
votes
1answer
29 views
what are the unforseen consequences to using visudo to enable wheel group to run all sudo commands?
On CentOS release 5.11 (Final) I created a user and added them to the wheel group with usermod but when I look in the sudoers file at /etc/sudoers the relevant line is commented out. Looking at ...
1
vote
1answer
56 views
useradd on CentOS with home directory and sudo privileges
There are so many variants to adduser or useradd -- which is correct?
On CentOS release 5.11 (Final) I'm using adduser --create-home baz but somewhat prefer the way Ubuntu asks extraneous questions ...
1
vote
1answer
31 views
Why doesn't sudo -E keep my $HOME environment variable?
On my Red Hat machine, when I run the command echo $HOME with my normal user account, I get /home/snrub. When I run the command sudo vim foo.txt and inside vim I type echo $HOME I get /root returned. ...
1
vote
1answer
19 views
Security ramification of using this line in visudo: yourUSERname ALL=(otherUSERaccount) NOPASSWD: ALL
I'm setting up limited accounts on my arch linux build to run proprietary software such as games or windows binaries. These restricted accounts won't have read/write access in my personal folders or ...
1
vote
1answer
35 views
`root` vs `sudo` from ulimit POV
According some other questions and answers, I expected the same results for both commands, but that's not the case.
furthermore, running a process from sudo, terminated with "too many open files", ...
3
votes
3answers
68 views
What is the differece between root terminal and sudo?
Environment:debian8+lxde.
There are two terminal in system tools:LXTerminal and Root Terminal.
When to login with a normal user (not root user),and System tools--Root Terminal,you can have ...
3
votes
1answer
33 views
How do I find out who added a user?
Assuming that someone used sudo to add a user, is there an easy way to determine who it was?
1
vote
1answer
49 views
How to execute root command scripts from not root user with SUID use?
I want to execute a script embedding commands requiring a root user from my not root account without sudoing:
/usr/local/bin/dodo
#!/bin/bash
/bin/sync && /usr/sbin/pm-suspend-hybrid
What I ...
20
votes
3answers
856 views
How do I find out if my sudoer privilege timed out?
I'm working on a script that runs a command as sudo and echoes a line of text ONLY if my sudo privileges have timed out, so only if running a command with sudo would require my user (not root) to type ...
-1
votes
0answers
13 views
How to forbid common commands but allow their use with sudo
#%sudo ALL=(ALL:ALL) ALL
and allow user to use root for command ls and vi
user1 ALL=(root) /usr/bin/vi,/bin/ls
and then
chmod 744 /usr/bin/vi
etc.
Currently I propose above solution for normal ...
-1
votes
1answer
45 views
forcing sudo on remote rsync server
I'm setting up rsync to transfer files from ServerA to ServerB, and need to preserve timestamps and permissions. They key here is the files are owned by a different account than the one performing ...
6
votes
4answers
1k views
Sudoers blacklist
We need to add few users to the sudoers file on Linux. They should be able to to anything root can except the following:
Should not modify, read, delete /nfsshare/config
Should not modify, read, ...
0
votes
1answer
52 views
remote sudo commands not working
My company has automated AD integration via puppet. Long story short, servers were joining the wrong domain. I wrote a bash script to remove them from the current domain but my remote sudo commands ...
0
votes
0answers
19 views
su authentication failure & sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set [duplicate]
today I was attempting to setup nginx and I made a huge mistake. I'm on Manjaro KDE Edition (16.10.3).
Since nginx gave me 403 - forbidden, I gave a look at Resolving "403 Forbidden" error and, since ...
0
votes
0answers
28 views
Disable requiretty on ubuntu 16.04 for jenkins?
I'm running jenkins on Ubuntu 16.04 and one of my makefiles has a sudo command. When it runs I see this error in the output:
sudo: no tty present and no askpass program specified
I had the same ...
0
votes
1answer
92 views
Sudo command in bash
I am a total NOOB to Linux and am using bash script to retrieve files for an Arduino. I am using bash script instead of sudo. Here are my instructions:
The following command will clone the brewpi-...
1
vote
2answers
45 views
Make directory unmodifiable or undeletable except by root
I would like to prevent a directory from being deleted, let's assume the directory has this path
~/foo
is there a way to make it deletable only by the root user, without using sudo and without being ...
0
votes
2answers
43 views
Setting umask for su user command
In my system I set the umask for the user root to 0077 and for the non-root users to 0027 (via /etc/profile). This is working for the normal terminal logins. But if I login as root and change user ...
0
votes
1answer
72 views
/etc/profile not sourced for `sudo su`
I have PATH=foo set in /etc/profile
According to /etc/password the root and myaccount users have /bin/bash as the login shell.
When I log in as myaccount, the PATH has been set correctly from /etc/...
0
votes
2answers
67 views
How to stop sudo PAM messages in auth.log for a specific user on Ubuntu 16.04?
I'm on Ubuntu 16.04 and I'm trying to stop /var/auth.log being flooded by a script that checks if some hosts are alive on the network periodically. The script internally uses sudo with nmap.
I have ...
0
votes
1answer
28 views
sudo: unable to resolve host dhcppc1
I get following error whenever i do something like:
sudo apt-get install sddm
sudo: unable to resolve host dhcppc1
It happened when i upgrade from 14.04 to 16.04.
/etc/hosts
127.0.0.1 ...
0
votes
1answer
22 views
Always passing -A (--askpass) to sudo
I would like sudo to always do as if I had passed the -A (--askpass) option.
I would like that so that sudo always uses my gnupg agent and password store. It already works if I pass -A manually, but ...
1
vote
1answer
49 views
Permission denied: writing a udev rule to to a test file in /etc/udev/rules.d/ [duplicate]
An Ubuntu 16.04 udev rule is defined:
target='SUBSYSTEMS=="usb", ATTRS{product}=="Metrologic Scanner", GROUP:="username"'
Command to append a rule to test udev file fails:
sudo echo $target > /...
0
votes
0answers
22 views
Why am I asked for a password when NOPASSWD is set, but I can switch to root shell and run the same command without a password?
My current user is in /etc/sudoers as currentuser ALL=NOPASSWD: ALL
If I do sudo -u postgres psql postgres I am asked for a password, but if I do sudo -s && sudo -u postgres psql postgres I ...
1
vote
3answers
37 views
Can a sudo session be reused after logging out?
The sudo command remembers for a while that I entered my password, so that I don't need to re-enter it every time. I know that I can delete this "session" using sudo -k.
Now, if I was logged in via ...
-1
votes
2answers
108 views
Why does sudo not prompt for a password again after “command not found”?
I observe this issue below:
abc@ubuntu:~$ sudo - i
[sudo] password for abc:
sudo: -: command not found
abc@ubuntu:~$ sudo -i
root@ubuntu:~#
sudo command seems to fail with error "command not ...
1
vote
3answers
44 views
How to design a mutiple level password security for one user
I am wondering if it was possible to have an enhanced version of PAM that implement a login with multiple level passwords.
For instance, I am interesting requiring not 1 but 3 different passwords to ...
0
votes
0answers
42 views
SSH SendEnv and command=“script” overwrites EnvVariable
I've got the following problem: I try to push/set a EnvVariable via
ssh -o SendEnv=APITOKEN host
on the remote host is the following setup:
this line in /etc/ssh/sshd_config:
AcceptEnv LANG LC_* ...
1
vote
0answers
32 views
Command to force user to enter password - RHEL/Centos
I am trying to use Ansible to create a new user and set a password for this user. I want to test if the password was actually set. I figure a command that forces me to enter the user's password would ...
2
votes
2answers
42 views
Unable to use sudo and other apps
I have a vital problem because of my stupid fault. I've been learning file security on my main OS (Ubuntu 16.04). I changed my /usr directory's permissions by executing sudo chmod 750 /usr command. ...