Roundcube Change-password plugin

Ok, but it’s still unclear. I can’t recognize the right place to install this script - as I suppose I need to run the shell and what else… to go to script directory? another place? maybe someone could show me the way step by step? I use CentOS also. If there are problems in CentOS, maybe should be better to change the system to Debian?

Mat

The virtualmin.php runs the binary which changes pw.

Follow the steps in the binary, then configure virtualmin in config.inc.php , a new password option will appear in settings of roundcube.

Hi,

I follow the roundcube/plugins/password README file to change the setting and drivers chgvirtualminpasswd remind setting

/* INSTALLING:
gcc -o chgvirtualminpasswd chgvirtualminpasswd.c
chown root.apache chgvirtualminpasswd
strip chgvirtualminpasswd
chmod 4550 chgvirtualminpasswd
*/

but when roundcube change the password it come out the error “Could not save new password.”

log file sh: /home/lblgh/public_html/roundcube/plugins/password/drivers/chgvirtualminpasswd: Permission denied

when change chmod 777 chgvirtualminpasswd, also get a some problems may I know got other thing need to change it? I install it by new function install script.

any other ppl solve this problems???

Hello guys,

I got it working. It is a permssion problem.
If you are running PHP with FCGId mode, the domain owner user runs PHP, no apache.
So, I’ve change the user group on the installation script, the chown line, like this:

/* INSTALLING:
  gcc -o chgvirtualminpasswd chgvirtualminpasswd.c
  chown root.<domain owner user> chgvirtualminpasswd
  strip chgvirtualminpasswd
  chmod 4550 chgvirtualminpasswd
*/

It works.

Cheers,

. Rogerio

I just came across this issue. What is the domain own user referring to ?

Hello,

You can check the domain user on Virtualmin->Edit Virtual Server.

The domain user is the “Administration Username” on Vitual Server Details.

Rogerio

I have another findings regarding fail to change password using virtualmin drivers

http://www.virtualmin.com/node/23015

Hi Guys,

i’m stuck with the same problem here. i tried permission change to domain owner as suggested above, but no luck. strange thing is, that even when i rename the chgvirtualminpasswd file, the error message stays the same, so it seems that php is not even touching the file?

i’ve read some posts about exec rights and requiretty, but those settings are correct as well.

does anyone have a final solution for this?

i’m running on centos 6.2

many thanks in advance!
Niels

I looked into this a bit, and was able to get it working using the current RoundCube version (0.8.1), which is provided as a Virtual Install Script – but I had to make one tweak.

It appears that there is a PHP syntax error in this file:

roundcube/plugins/password/drivers/virtualmin.php

You’ll see these lines near line 54:

case 7: // domain_username $pieces = explode("_", $username); $domain = $pieces[0]; break; case 8: // domain taken from alias, username left as it was $email = $rcmail->user->data['alias']; $domain = substr(strrchr($email, "@"), 1); break default: // username@domain

The problem is that second-to-last line, where it says “break”.

There needs to be a semi-colon after that line. It should read “break;”. Or, the entire code block would look like this:

case 7: // domain_username $pieces = explode("_", $username); $domain = $pieces[0]; break; case 8: // domain taken from alias, username left as it was $email = $rcmail->user->data['alias']; $domain = substr(strrchr($email, "@"), 1); break; default: // username@domain

The only change I needed to make was just adding the ; character to that one line.

Let us know if that works for you!

I wrote up more complete instructions available in the forum post here:

http://www.virtualmin.com/node/23427

Hi Guys,

I was able solve this issue by changing the group in to apache. My setup is Nginx+php-FPM. The php-FPM is running as apache user. So I changed the ownership as chown root.apache chgvirtualminpasswd

Thanks,
Karlos