Background:
My developers are installing an informatica product in a RHEL8.3 server. The services are running using a user called infa_admin
, and this user is already in the wheel
group. This user is able to run all administrative commands using sudo
without prompting for password.
They have a requirement to disable SELinux
, which is not allowed based on our org policies.
The workaround they are suggesting is to have the user infa_admin
to be able to stop/start/restart certain services without using sudo
.
Assuming the service is called nginx
, currently they can do the following:
sudo systemctl restart nginx
They need to do the following:
systemctl restart ngnix
--> currently this will prompt for password, which is not what they want.
The actual services they need to be able to manage are : discoverypostgres , zk and solr
Based on my understanding, this is not possible. Is there anyway to do this ?
sudo
? You can set it up such as only specific commands to be run withsudo
is allowed for some users, not just the any command. – Nikita Kipriyanov Oct 07 '21 at 05:59sudo
you can try relying onpolkit
: Here's an answer that creates a polkit rule to perform this: https://unix.stackexchange.com/questions/504806/systemd-start-as-unprivileged-user-in-a-group/557634#557634 – Stewart Nov 26 '21 at 14:42