Add notes about sudo setup (#1490203)

pull/278/head
Aleksander Machniak 10 years ago
parent 59d11dce33
commit 1c8f845637

@ -46,6 +46,7 @@
2.20. Plesk (Plesk RPC-API) 2.20. Plesk (Plesk RPC-API)
2.21. Kpasswd 2.21. Kpasswd
3. Driver API 3. Driver API
4. Sudo setup
1. Configuration 1. Configuration
@ -348,3 +349,17 @@
PASSWORD_CRYPT_ERROR, PASSWORD_ERROR when driver was unable to change password. PASSWORD_CRYPT_ERROR, PASSWORD_ERROR when driver was unable to change password.
Extended result (as a hash-array with 'message' and 'code' items) can be returned Extended result (as a hash-array with 'message' and 'code' items) can be returned
too. See existing drivers in drivers/ directory for examples. too. See existing drivers in drivers/ directory for examples.
4. Sudo setup
-------------
Some drivers that execute system commands (like chpasswd) require use of sudo command.
Here's a sample for CentOS 7:
# cat <<END >/etc/sudoers.d/99-roundcubemail
apache ALL=NOPASSWD:/usr/sbin/chpasswd
Defaults:apache !requiretty
<<END
Note: on different systems the username (here 'apache') may be different, e.g. www.
Note: on some systems the disabling tty line may not be needed.

@ -295,7 +295,7 @@ $config['password_ximss_port'] = 11024;
// chpasswd Driver options // chpasswd Driver options
// --------------------- // ---------------------
// Command to use // Command to use (see "Sudo setup" in README)
$config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null'; $config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null';
@ -337,9 +337,8 @@ $config['password_virtualmin_format'] = 0;
// pw_usermod Driver options // pw_usermod Driver options
// -------------------------- // --------------------------
// Use comma delimited exlist to disable password change for users // Use comma delimited exlist to disable password change for users.
// Add the following line to visudo to tighten security: // See "Sudo setup" in README file.
// www ALL=NOPASSWORD: /usr/sbin/pw
$config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n'; $config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n';

Loading…
Cancel
Save