Author Topic: chpasswd PHP Sudo issue returns.  (Read 87 times)

Offline Blackice000

  • Newbie
  • *
  • Posts: 7
chpasswd PHP Sudo issue returns.
« on: January 13, 2021, 01:31:26 PM »
Greetings.
  I have had a roundcube instance running perfectly for many years. Thanks!
At the moment, running CentOS 7.9.2009, PHP 7.3.26 and the latest version of the chpasswd plugin.

For some reason I am unable to get a password change from the webgui. Error is:

[13-Jan-2021 18:13:26 +0000]: <nmtb4em3> PHP Error: Password plugin: Unable to execute sudo /usr/sbin/chpasswd 2> /dev/null in /var/www/html/roundcube/plugins/password/drivers/chpasswd.php on line 46 (POST /?_task=settings&_action=plugin.password-save)

I have added lines to the /etc/sudoer file

apache ALL=NOPASSWD: /usr/sbin/chpasswd
Defaults:apache !requiretty

with no change at all.

/usr/sbin/chpasswd

-rwxr-xr-x 1 root root 57216 Aug  8  2019 chpasswd

What am I missing???

Rick


Offline Blackice000

  • Newbie
  • *
  • Posts: 7
Re: chpasswd PHP Sudo issue returns.
« Reply #1 on: January 14, 2021, 12:11:53 AM »
I may have discovered the error issue.

seems that /dev/null was NOT writable by even a sudo'ed apache. So the exec error was related to the permissions of /dev/null

Rick