Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added notes on additional testing based on comment
Source Link

I'm trying to make it so a user can reload PHP-FPM without needing a password everytime.

I've added the following to the /etc/sudoers file using pkexec visudo, and there are no syntax errors, but it is still not working, any ideas?

Defaults exempt_group=forge
User_Alias FORGE = forge
Cmnd_Alias FORGE_COMMANDS = /usr/sbin/service php-fpm *
FORGE ALL = (ALL) NOPASSWD: FORGE_COMMANDS

I've hunted everywhere and this seems to be a common problem of getting it to work, but each question doesn't seem to have an answer, or one that works for me.

Using CentOS 7.

Thanks.


When using sudo -u I get the following:

==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to manage system services or units. Multiple identities can be used for authentication:

I can then proceed as normal, but the point is for forge to be able to do this without requiring authentication.

I'm trying to make it so a user can reload PHP-FPM without needing a password everytime.

I've added the following to the /etc/sudoers file using pkexec visudo, and there are no syntax errors, but it is still not working, any ideas?

Defaults exempt_group=forge
User_Alias FORGE = forge
Cmnd_Alias FORGE_COMMANDS = /usr/sbin/service php-fpm *
FORGE ALL = (ALL) NOPASSWD: FORGE_COMMANDS

I've hunted everywhere and this seems to be a common problem of getting it to work, but each question doesn't seem to have an answer, or one that works for me.

Using CentOS 7.

Thanks.

I'm trying to make it so a user can reload PHP-FPM without needing a password everytime.

I've added the following to the /etc/sudoers file using pkexec visudo, and there are no syntax errors, but it is still not working, any ideas?

Defaults exempt_group=forge
User_Alias FORGE = forge
Cmnd_Alias FORGE_COMMANDS = /usr/sbin/service php-fpm *
FORGE ALL = (ALL) NOPASSWD: FORGE_COMMANDS

I've hunted everywhere and this seems to be a common problem of getting it to work, but each question doesn't seem to have an answer, or one that works for me.

Using CentOS 7.

Thanks.


When using sudo -u I get the following:

==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to manage system services or units. Multiple identities can be used for authentication:

I can then proceed as normal, but the point is for forge to be able to do this without requiring authentication.

Source Link

Allow user to run PHP-FPM without password using sudoers

I'm trying to make it so a user can reload PHP-FPM without needing a password everytime.

I've added the following to the /etc/sudoers file using pkexec visudo, and there are no syntax errors, but it is still not working, any ideas?

Defaults exempt_group=forge
User_Alias FORGE = forge
Cmnd_Alias FORGE_COMMANDS = /usr/sbin/service php-fpm *
FORGE ALL = (ALL) NOPASSWD: FORGE_COMMANDS

I've hunted everywhere and this seems to be a common problem of getting it to work, but each question doesn't seem to have an answer, or one that works for me.

Using CentOS 7.

Thanks.