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.
1,147
questions
0
votes
0
answers
15
views
Why Redhat 9 always prompt sudo password when the first time
I created one sudoer conf(testSudoers) in /etc/sudoers.d.
cat testSudoers we can see
User_Alias DEVGRP=bqdev1, bqdev2, bqdev3
Cmnd_Alias DEV_CMD=/bin/su - -c /usr/sbin/lsof *
## Allow dev group to ...
0
votes
0
answers
15
views
sudo still asks password after editing sudoers [duplicate]
I need to execute the command
ssh [email protected] "sudo systemctl stop crs_svc"
in my GitLab YAML script. To do so I have updated the /etc/sudoers file on the host 10.1.0.56 and added the ...
1
vote
1
answer
89
views
What happens if you use sudo as root?
What happens if you use sudo as root? I use root by default and many tutorials have sudo and am wondering if there could be any adverse side effects from copying and pasting in sudo apt install ...
3
votes
1
answer
131
views
Change Window Title When Start PowerShell with Sudo.exe
I tried starting powershell with Sudo for Windows from CMD or Batch. Works fine. A PowerShell window opens with administrator rights:
rem CMD/BAT
sudo.exe start powershell.exe
Then, I tried adding a ...
1
vote
1
answer
52
views
Is it safe to do "snap install" with sudo
I am a root user on a workstation; I give access to others on this system.
They are requesting me to install:
sudo snap install google-cloud-cli
An experienced friend of mine had earlier suggested to ...
0
votes
0
answers
28
views
How to properly create a useable disk image for Virtual box?
I can create the disk image of a bootable Linux HDD by using sudo, but then it fails to boot in VirtualBox. My steps are as follows:
dd if=/dev/sde of=sda.img bs=1024 conv=noerror,sync
VBoxManage ...
0
votes
1
answer
43
views
Is this missing library something I can install without sudo privileges?
OS
I'm using a CentOS 7 system, which like a red hat system from what I observe (relevant further down the post.)
cat /etc/*-release
CentOS Linux release 7.8.2003 (Core)
NAME="CentOS Linux"
...
0
votes
1
answer
117
views
sudo user input sanitize, to avoid error "bash: Invalid option" or "sh: Invalid option"
I'm using sudo from bash to execute an arbitrary wild command as a specific user.
This works perfectly in general cases:
sudo --login --user=maria -- "$COMMAND"
For example, this calls the ...
0
votes
1
answer
110
views
give <user> the same permissions as root using sudo [duplicate]
To do this, I seem to have two options:
add (user) to the sudo Group:
# usermod -aG sudo <user>
add (user) to /etc/sudoers
# visudo /etc/sudoers
.........
<user> ALL=(ALL:ALL) ALL
....
...
1
vote
0
answers
68
views
How to let root use sudoedit as if it was a user?
I'm writing a wrapper for myself around vim that detects when the user's trying to edit a file that doesn't belong to them, and suggests sudoedit or visudo instead. I want to use sudoedit rather than ...
0
votes
0
answers
17
views
Why would sudo complain about DNS name resolution? [duplicate]
I'm running on Ubuntu 22 Linux. When I try to manually fix my /etc/resolv.conf file using
sudo vi /etc/resolv.conf
# or
sudo cp $HOME/tmp/working-resolv.conf /etc/resolv.conf
The command appears to ...
0
votes
0
answers
45
views
sudo visudo in a Dockerfile with CentOS base image
I am creating a Dockerfile using the centos:7 base image. I need to edit the file at etc/sudoers and append NOPASSWD privileges to it for a new user and some groups.
I have looked up in forums that ...
0
votes
0
answers
28
views
Validating Changes to pam.d (like visudo)
I'm working on an Ansible task for setting fingerprint sudo usage in MacOS. This is done through a custom rule in /etc/pam.d/sudo_local.
Is there a method to pre-validate edits to PAM for safer ...
-1
votes
1
answer
94
views
passthru background process sudo multiple commands
Have problem running the command in background. Below is configuration of code.
1] Using php passthru running a command as a different user than current
2] The command has multiple commands to run ...
1
vote
1
answer
71
views
Runing a command as user is not the same as logging as the user and running the command
I am trying to get a way to execute a script from a root session, but I am having some trouble with it. I'll lay out the issue:
I have a script that performs some tasks as the regular user 'kolterdyx',...