How to prevent systemctl command from asking for the root password
Issue
-
When executing an administrative command with
systemctl
as a regular user (e.g.systemctl restart <servicename>
), the password for root user is requested:$ systemctl start rsyslog ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to manage system services or units. Authenticating as: root Enter login password: **** ==== AUTHENTICATION COMPLETE ===
-
Why does this happen and how to disable this completely?
Environment
- Red Hat Enterprise Linux 7 and later
- polkit
- systemd
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.