Author Topic: Password Plugin -- Virtualmin [SOLVED]  (Read 7849 times)

Offline wildbill442

  • Newbie
  • *
  • Posts: 1
Password Plugin -- Virtualmin [SOLVED]
« on: July 01, 2013, 01:41:41 PM »
So for the past few days I've been searching for a solution to this problem, but have yet to remedy it.

I'm unable to use the password plugin to change passwords on my virtualmin server w/ roundcube.

The following topic is related to this issue:

http://www.roundcubeforum.net/index.php/topic,8691.msg41026.html#msg41026

Here's the error

[Mon Jul 01 09:32:15 2013] [error] [client **IP_ADDRESS**] PHP Warning:  Password plugin: Unable to execute /home/example.com/domains/webmail-new.example.com/public_html/plugins/password/helpers/chgvirtualminpasswd in /home/example.com/domains/webmail-new.example.com/public_html/program/lib/Roundcube/rcube.php on line 1156, referer: http://webmail-new.example.com/?_task=settings&_action=plugin.password

I've tried changing owners/permissions to no avail... The installation instructions indicate to set the user:group to root:apache with chmod of 4550... However no combination of different users/groups seem to work.

I am able to execute the command using the following PHP file in the document root:

Code: [Select]
<?php

echo exec('/path/to/exec/chgvirtualminpasswd --help');

?>


Which tells me the permissions should be correct.


.........................

[Solution]

After further troubleshooting, the error message that gets thrown if for any error is a bit miss leading.

Code: [Select]
#[roundcube_plugin_dir]/password/drivers/virtualmin.php

     70             raise_error(array(
     71                 'code' => 600,
     72                 'type' => 'php',
     73                 'file' => __FILE__, 'line' => __LINE__,
     74                 'message' => "Password plugin: Unable to execute $curdir/chgvirtualminpasswd"
     75                 ), true, false);

Regardless of the error, the above $raise_error['message'] was output to the log file. Which tells the user there's a permissions problem with the file. Or problems executing.

I changed the 'message' variable to output the username/domain format so I could see what arguments were being passed to the chgvirtualminpasswd executable. The result was the entire email address as the username and no domain, causing the executable to return 1.

Fixing the config file so that it had the correct user/domain format resolved the problem.

Code: [Select]
#/password/config.inc.php
$rcmail_config['password_virtualmin_format'] = 0;

I've been banging my head against the wall because I thought it was a permissions issue the entire time. Hopefully this helps someone else!
« Last Edit: July 01, 2013, 01:46:57 PM by wildbill442 »