I looked at this question:
Trying to understand the difference between “modernNeo ALL=(ALL:ALL) ALL” and “modernNeo ALL=(ALL) ALL” in the sudoers file
I still have a question. Since the "root" user ...

Context:
While trying to execute command su a -c task as user dummy when being logged (with sudo su in as root on Ubuntu 16.04, I receive the following error message:
root@DESKTOP-344ab:/home/dummy#...

user1 runs sudo -u user2 SomeCommand. I want SomeCommand to be able to access the files of user1 (or just a specific directory or even a single file, if that's easier), without giving access to user2 (...

I just downloaded Debian 9.6.0 from osboxes to run it on a VM.
However, I ran into a few problems.
I can't sudo. Ok, you have to install it first. No problems... I thought. Turns out, there are a few ...

With sudo, you can either set it to ask for a password or not ask for a password.
Historically, everything was password-protected, which is the model that I am used to. However, encryption seems to ...

I have two servers running the same version of RedHat 6.4, however one of them behaves differently when I run remote sudo commands through SSH on it. On server1, the connection is automatically closed ...

From
https://stackoverflow.com/posts/53809141
What is the difference between sudo -s and sudo -i?
In the book "A practical guide to linux commands, editors and shell programming" by Mark G. Sobell, ...

I'm running CentOS7 on an old dell box that I repurposed as a home server. I also ssh into it from a remote location to make sure everything is running smoothly, and to do things like rsync my laptop. ...

I accidentally moved /etc/sudoers to Documents.
I need to move it back to /etc, but I can't since I need to be sudo to move files...
sudo mv Documents/sudoers /etc
sudo: unable to stat /etc/sudoers: ...

I am writing a script that is supposed to ask for user's password, do some stuff with it and eventually pass it to sudo. This is roughly how it looks:
echo "input password: "
read -s password
printf "...

I wanted to allow specific non root users to start/stop certain systemd services in CentOS7. But there has been no luck on the steps that I have tried so far. Here is what I have tried.
I have added ...

When using sudo -s (short for the "--shell" option), it is possible to pass "sudo" a command, in which case it will run the command in a shell started by "sudo" as the target user.
(Similarly, sudo -...

I configured docker in Windows 10 Home to connect with docker in WSL (Windows Subsystem in Linux).
When I run sudo docker run hello-world in WSL, it gets the error message
docker: Cannot connect to ...

I need to access a file on an NFS fileserver where root squash is turned on. I'm using bash on Arch Linux. I am using this type of command:
# sudo -u authduser ls /mounted/filesystem/path/aa.user.js
...

I have a small function in my .zshrc. It creates a command to search for and run an executable file, that may or may not exist, in the current directory, or a parent directory somewhere up the current ...

When writing a shell script, in which some but not all commands in it need superuser privileges, shall I
add sudo to those commands which need superuser privileges, and run the shell script without ...

I learned from https://unix.stackexchange.com/a/230568/674 thatping will exit with 0 after receiving SIGINT, which allows a bash script containing a ping command to continue running instead of exiting....

In /etc/cron.d/myjob, I create a cron task of running a bash script and redirect its stdout and stderr to a log file. The script contains a line of sudo running a command.
In the log file:
sudo: no ...

I am trying to get launchd (which is macOS's alternative for cron) to run a job for me. It doesn't work, while running the commands on a bash launched with sudo does. I tried redirecting the output to ...

I am writing a Bash script to manage various JBoss instances across multiple servers.
The script allows users to check the status of each instance as well as stop/start them. The script is situated ...