Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sudo]

The sudo command is a program for some Unix and Unix-Like operating systems, that allows a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user.

0
votes
0answers
4 views

sudo/pkexec vs sandbox: Differences & Pros/Cons

I am looking at running Jitsi on Debian. For security reasons, I want to isolate Jitsi from the rest of the system. I could use a VM, but I want a lighter solution. So I looked at sudo/pkexec vs. ...
0
votes
0answers
18 views

Plink sudo rootsh send password

I want to automate some tasks on a server and i'm having some issue with sending the password for sudo. Scenario: linux server can ssh with local user ( I can send this user's password via plink) ...
1
vote
1answer
10 views

windows network drive linux mount requires sudo after mounted

I am able to mount a drive to the linux box using sudo. sudo mount \ -t cifs \ -o 'vers=3.0,username=myuser,domain=mydomain' \ '//windows-ip/share-folder' ~/testmount/ This works great, ...
0
votes
2answers
14 views

Reenable Google Chrome updates on Mac

i was wondering if any of you guys is able to help me reenable Google Chrome updates ? Please note that i have no programming knowledge of any kind and i am a total noob. A friend of mine ran the ...
0
votes
0answers
15 views

sudoers: can´t run 2 command lists where the second has a glob * and denies the first

so, what I want is: to be able to run /sbin/print/managequeue.sh -p app1 --view as another user without asking password. to be able to run /sbin/print/managequeue.sh -p app1 --cancel (or --delete, ...
0
votes
1answer
37 views

Using git command without sudo on CentOS [closed]

I would like to use git without taping sudo everytime i tape a command on CentOS and i have no idea how to do it. I checked on google and i found this some command with chown but none of them worked ...
1
vote
1answer
47 views

How to send sudo password in a shell script

My shell script (don't have EXPECT, and is not possible) runs a shell script impersonating another user. Let's say the following script is named toto1.sh and is run with a user called MYUSERNAME1. #!/...
0
votes
1answer
74 views

sudo su with password provided in jenkins?

I am stuck with one requirement in which I am switching to some "xxx" user and it asks for password every time. I am trying to automate this process with password hardcoded in Jenkins job. ex: sudo su ...
0
votes
0answers
17 views

Sudoers Argument Parsing using Python

I am working on a project and I need to be able to limit the command line arguments for commands when they are called with sudo. The parsing we are doing is big enough that using glob would be painful,...
0
votes
0answers
20 views

Locked out while setting up nginx

It's my first time trying to setup a web server. I was trying to set up a Digital Ocean Droplet running CentOS. During nginx setup, I 'accidentally' changed the permission of '/' to the nginx user, ...
0
votes
1answer
30 views

Debain(buster) su not working properly, command not found

For example: I installed ifconfig First i become root with "su" Now I write "ifconfig" and get: "command not found". I write "sudo ifconfig" and now it works. This seems to happen with a lot of ...
0
votes
1answer
33 views

How do I create a window as sudo from .screenrc

I have created a .screenrc file to automatically setup my various windows when I run screen. In one window I'd like to: switch to the root user, then change to a certain directory. I currently do this ...
0
votes
3answers
118 views

How to provide password directly to the sudo su -<someuser> in shell scripting

I got a requirement to automate in shell script for sudo su -<someuser> which asks for password. How to provide password directly to the sudo su - in shell scripting for IBM AIX servers. I have ...
2
votes
2answers
24 views

Setting LD_LIBRARY_PATH to point to a backup of sudo does not work

I've accidentally removed the contents of the /usr folder, but I have a backup of it in /mnt/usr. To fix it I need sudo, but it was in /usr/bin. So I tried to use /mnt/usr/bin/sudo, but it throws a ...
0
votes
2answers
65 views

Execute a script as root when non root user logs in

I've seen this question asked before here and here but they're pretty old and I haven't been able to get any solution to work. Basically I need to run a script or command automatically as root each ...
0
votes
1answer
64 views

I forgot my sudo password

I forgot my sudo password. I want to install a package and it needs me my sudo password. Every time I enter the password by chance. I get the error of try again. Would you please tell me how I can ...
0
votes
0answers
41 views

Su/sudo not working consistently

I am running Debian on a Lenovo x220 and upgrade my packages quite regularly. I discovered recently a change in the way how I elevate with sudo. Normally I just su or sudo stuff like e.g. arp-scan -l. ...
1
vote
1answer
111 views

sudo access a file without sudo password

I have a lab which requires me to use sudo to access a protected file and obtain its content. linux@sudo:~$ sudo -l Matching Defaults entries for linux on sudo: env_reset, mail_badpass, ...
0
votes
0answers
32 views

How can I get yum to work without root?

If I make all folder in the root directory world writable, something like: sudo chown 777 -R / Would this enable yum to work without root privileges? If not, is there a way similar to this to make ...
0
votes
1answer
42 views

CentOS 7 Apache run/execute web request as root user

I have a PHP Utility which accepts post request with file as parameter. Now when that request is received I want to execute it as root user. For example when user hits www.mydomain.com/...
0
votes
1answer
86 views

How to avoid “root is not allowed to run sudo”?

I am trying to execute some third-party installer script (ansible tower setup.sh) which needs to be started as root or via sudo as some of the commands rely on root privileges. However some commands ...
0
votes
1answer
77 views

Why running kill in linux needs sudo access

On one server(my development desktop), I am able to execute kill command without sudo, but on the other one, I will got kill: kill 1 failed: operation not permitted. I assume that kill command will ...
0
votes
2answers
58 views

Should I add sudo before the fastboot command on macOS just like on Linux?

I will be using fastboot on macOS. I will be following this tutorial. The guide only mentions Windows and Linux, and I do not wish to install those on my Mac right now, and as I think fastboot is the ...
0
votes
1answer
41 views

sudo python vs python

I have an instance in EC2 running Linux. I am trying to use the AWS Python DAX Client. The Dax Client is operating at the TCP level. I am running one of their example sample code https://github.com/...
0
votes
1answer
119 views

SSSD/NSS Slow When Using Sudo

I have a server running OpenLDAP, and the issues I am running into is with my client. My client is running SSSD with NSS. On first boot, I have no issues, and sudo commands are issued fine. I start ...
0
votes
1answer
88 views

Sudo with auth sufficient pam_tid.so does not work with tmux

I did not really like the idea of installing some third-party sudo tool, so instead of using sudo-touchid I decided to use the /etc/pam.d/sudo trick and it works wonders. I use iTerm2 with zsh, and ...
0
votes
0answers
18 views

How to remove sudo dependency for programs installed using bioconda?

I installed a program using conda and pip with sudo privileges because the program requires tons of dependencies which installations are root required. After successfully installed the program, I was ...
1
vote
0answers
49 views

How to debug program creating RAW socket?

For example I have this program: int main() { int sockfd = ::socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); if ( sockfd == -1 ) printf("Error\n"); else printf("Success\n"); return 0; } ...
0
votes
0answers
90 views

How to execute a binary file in Ubuntu?

I would like to execute this binary file: /usr/bin/snx (CheckPoint Security VPN client) When I execute snx or sudo snx from anywnere, the responses are: bash: /usr/bin/snx: No such file or ...
0
votes
1answer
34 views

How do i reverse alias command?

I executed this command : sudo ifconfig lo0 alias 10.200.10.1/24 I think this changes my localhost address and I think my dockers seem to stop working because of this. Is there a way to reverse ...
3
votes
3answers
119 views

stop systemctl using graphical sudo prompt

My question is how could I configure systemd(?) to stop opening this annoying pop-up whenever I forget to type sudo. Just give me a text-based sudo prompt or show an error, so I can correct the ...
5
votes
2answers
2k views

Sudoers NOPASSWD for single executable but allowing others

Operating System: Arch Linux Linux version: 4.16.11 Sudo version: 1.8.23 What I need: be able to execute any executable with a sudo with a password prompt be able to execute one executable, /home/...
0
votes
1answer
65 views

Is there something like a sudoers list in Windows?

In UNIX-like systems, normal users can obtain higher priviledges using the sudo command (or they can temporarily switch the user using su). However, with a properly configured sudoers and PAM file, ...
0
votes
0answers
88 views

Setting sudo rights for an Icinga2 Service

I have icinga2 installed on 3 Servers, all with debian stretch. On one Server I have glusterfs-Server running and would like to monitor it with icinga2. From the icinga2 website I downloaded the ...
0
votes
0answers
176 views

Root user no longer exists

I'm running macOS Server 5.6.1 on High Sierra (10.13.4) and I was trying to modify a system launch daemon plist file the other day as my apache installation wasn't working after migration. sudo wouldn'...
2
votes
2answers
85 views

Locked out of sudo by erroneous PAM config causing PAM bad jump in stack

While trying to mitigate some spammy PAM messages in /var/log/auth.log, following this post, I tried various combinations in /etc/pam.d/sudo. Unfortunately, the last line I tried, completely locked me ...
1
vote
0answers
108 views

sudo minikube returns “command not found”

I need to run minikube as sudo on Centos 7.5. minikube is in /usr/local/bin For my user echo $PATH is: /usr/local/maven/bin:/usr/lib64/qt-3.3/bin:/usr/local/maven/bin:/usr/local/bin:/usr/local/sbin:/...
3
votes
1answer
788 views

“sudo” session behavior in graphical environment

I wrote these two scripts and they are in my $PATH: gsudo: #! /bin/bash sudo -n true &> /dev/null if [ $? -eq 0 ] then sudo "$@" else upass=$(zenity --password --title "Enter your ...
1
vote
1answer
83 views

zsh+ohmyzsh+powerlevel9k: completions stop working when issuing 'sudo -s'

I am having strange issue with zsh and ohmyzsh(with powerlevel9k theme) on MacOS High Sierra. After installing ohmyzsh when issuing sudo -s getting annoying and strange output of some script. And all ...
0
votes
0answers
45 views

ssh-agent and subshell not connecting

System user starts agent and adds the private key used for Github, in order for other terminal users to use. First things as the regular user eval $(ssh-agent -s) ssh-add Now I have a ...
1
vote
3answers
61 views

Why do one have to run sudo apt-get most times before installing a new software

Just out of curiosity, I've being wondering why should a debian or ubuntu user have to run sudo apt-get update or sudo yum update (in the case of other distros) most times before installing a new ...
1
vote
0answers
56 views

Nautilus does not have permission to mount; webcam and scanner are only recognised if the program has superuser permissions

I installed a minimal version of fedora 27 and have encountered several permission problems. When I try to mount a USB Stick using Nautilus or PCManFM it displays «Not authorized to perform operation»...
0
votes
0answers
658 views

sudo chown - operation not permitted

I don't understand why I'm not allowed to change the owner of a folder as root user (the folder is mounted with a hard disk). root@raspberrypi:~# chown -R www-data:www-data /media/hdd chown: ...
1
vote
1answer
540 views

sudo su not asking password even after changing password

I have an ubuntu instance with aws. After getting ssh login, I was able to change to root password with sudo su command. For security reasons, I wanted to change the root password. So I tries to ...
0
votes
2answers
165 views

sudo not working (accidentally deleted libz.so.1)

I have a Redhat 7 system and accidentally deleted the libz.so.1 symbol link under /lib64 I thought I can relink it with the actual copy of libz.so.1.7 using sudo ln -s but found that sudo does not ...
0
votes
0answers
38 views

Protect a Python file and still make it executable [duplicate]

I'm writing a little Python program with a main.py and a packet called backend. Now I want to protect the packet from accessing it but make it usable from the main.py with a normal user like AppUser ...
0
votes
1answer
145 views

uninstalling vim-minimal also uninstalls sudo in Centos 7.4

Setting up a new CentOS 7.4 machine. I installed vim using sudo yum install vim, and then I uninstalled vim-minimal with sudo yum remove vim-minimal. Now sudo has been uninstalled: $ sudo -bash: /...
1
vote
1answer
147 views

How is passwordless sudo achieved for the vagrant user?

I am confused. This is /etc/sudoers: vagrant@ubuntu-xenial:~$ sudo cat /etc/sudoers ...
0
votes
1answer
38 views

Difference in sudo logins and prompt display

What is the difference between sudo -s and sudo -i and why do they give me different shells? It appears -s keeps me within bash and -i gives me sh. On MacOSX High Sierra 10.13, if I type sudo -s into ...
0
votes
0answers
118 views

sudo via LDAP - Why not create a group 'sudo'

I want to manage sudo rights via LDAP. LDAP Authentication is already running. Can I create a Posix Group 'sudo' in LDAP to make this happen? The guide from sudo seems to be complex as a new schema ...