Questions tagged [sudo]

sudo is a tool which allows users to run commands as another user (usually the root user)

sudo allows users to run commands as another user. It is typically used to allow trusted users to run commands as root, without giving them root access, or to allow a user to run commands as another user. Both of these uses must be allowed by the root user.

886 questions
0
votes
1 answer

Apache Authentication - Find out user password

My field of expertise is far away from server management but I am currently covering for a former collegue of mine, so I apologize in advance if my question doesn't make sense. I have to restart an Apache server running on Debian. However, I do not…
0
votes
1 answer

i am root but ufw status says 'command not found'

as simple user, first I pass root with command : su I am now root on Debian 10 buster. When I hit ufw status, I have 'command not found'. But it works with sudo ufw status When I use su -, the command is ok. Can someone explain me this problem /…
rach
  • 1
0
votes
1 answer

Sudo privileges limited to a specific group of users

I'm configuring our new Ubuntu 22.04 VPS to host our react app and REST API. I followed this tuto that seems relatively advanced and complete : https://gofoss.net/server-hardening-advanced/ I'm currently adjusting sudo access. In this tuto, they…
0
votes
1 answer

Getting command not found using sudo, but not for running command as root without sudo

wierd issue where if you use sudo command for certain commands it is not found. But runnning it as root user WITHOUT sudo does work root@ip-172-31-43-153:/home/ubuntu# sudo xfs_growfs -d / sudo: xfs_growfs: command not…
user2958456
  • 101
  • 1
0
votes
1 answer

Why create a new user with sudo privilege when you are the only person manage the server?

Please share some true use cases of benefits when you are the only admin of manage VPSs, I'm just hosted my first WordPress site. A lot of guide I read online suggests creating a new user after update and upgrade for the fresh Linux OS. I found that…
Maxfield
  • 103
  • 2
0
votes
0 answers

Disable apt command for the particular sudo user

I am IT admin in the company. The developers ask to have sudo permission to execute sudo systemctl status/reload/start/stop serviceName to manage their app. But my boss doesn't want them to be able to run apt to install/remove/upgrade the package.…
ITnewbie
  • 171
  • 2
  • 9
0
votes
1 answer

Sudo: Using arguments in /etc/sudoers.d/ file, particularly with mount (visudo rejects syntax)

I have a syntax wrangling problem with sudo that may not be solvable. I know I know, OpenBSD's new doas is better than sudo, but it is not available on CentOS 7 or Rocky 8. So we're stuck with sudo for a while, girls and guys. If I add the following…
ping-me
  • 1
  • 2
0
votes
1 answer

sudoers with other user and colon ":" char

I require a sudoers to be able to execute following command sudo -u myAppUser /opt/myapp/bin/myapp.Console.pl Admin::User::Add I've created a group myAppExecGroup and added myTestUser to the group Cmnd_Alias …
cilap
  • 277
  • 5
  • 14
0
votes
1 answer

How to run a command as systemd DynamicUser

I am setting up a daemon for a web service and I want to use the systemd DynamicUser=yes feature because it seems cleaner not pollute the user table with a different user for each service. As is customary, my web service has an integrated command…
cmc
  • 677
  • 6
  • 7
0
votes
1 answer

Sudo: How can I exlude one specific command line argument from sudo

There is a command (say: mycommand) that we want to add to sudo for all users, but there is one specific command line option -i that we want to exclude. Complicating factor is that command line arguments can be combined, making it harder to build a…
Kees C
  • 1
0
votes
1 answer

Can you access VM instance in Google Cloud without being root?

I'm trying to access GCP VM instance but I messed it up and now I'm getting this error: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set but I don't have the root password. Is there a way I can access GCP VM instance as a rot…
0
votes
2 answers

Linux bash way for unprivileged user to take ownership of contents of only one particular directory?

I want a particular user to recursively change owner and group of all the contents of a particular directory, and only that directory. The directory is a kind of "inbox", where a service writes files, and subdirectories. Currently, I have an…
Charlweed
  • 249
  • 3
  • 14
0
votes
1 answer

DEBIAN 10 apt-get, sudo issues

I'm currently facing some issues with my dedicated server. I unfortunately removed some packages from my server yesterday. And now the man-db on my server seems not to work properly. This issue maybe occurs because I removed these packages. I tried…
Kuezy
  • 13
  • 3
0
votes
1 answer

Problems sudoing using a host connected to Active Directory (sssd, kerberos local sudoers file)

I am configuring Active Directory authentication for an Alma 8 box using SSSD, Kerberos, and initial SSH key for log in stored in an Active Directory object, and a local sudoers file that lists groups permitted to sudo. I have connected the server…
0
votes
0 answers

/etc/sudoers is owned by uid 1000, should be 0

I accidentally changed ownership of etc folder in a lightsail bitnami AWS machine. Is there a way to get the ownership back to root. The main problem seems to be that the root account doesn't have a password, so the password I enter is for the user…
Abhishek Rai
  • 115
  • 7