I modified my install so that the password plugin could use multiple drivers. Email is by far the service my users use the most, but it would be nice to keep their all their passwords in sync when the email password changes. The main change is that the save function loops through all selected drivers instead of just one. To avoid function name collisions, drivers can optionally use a prefix (e.g., sql_save_password instead of save_password).
Works pretty well for me with unix accounts & samba accounts. Patch is attached if there's interest.
I also have password plugin drivers for samba and unix accounts (using expect instead of PAM). Not sure if it's OK to attach lots of files to list posts.
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/Dt/xTBRWwgv/rcm.multipassword.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/ BT/aba52c80
On 2012-02-22 23:09, Andy Theuninck wrote:
I modified my install so that the password plugin could use multiple drivers. Email is by far the service my users use the most, but it would be nice to keep their all their passwords in sync when the email password changes. The main change is that the save function loops through all selected drivers instead of just one. To avoid function name collisions, drivers can optionally use a prefix (e.g., sql_save_password instead of save_password).
Works pretty well for me with unix accounts & samba accounts. Patch is attached if there's interest.
Hi Andy,
would this work for, say, multiple LDAP databases as well?
I also have password plugin drivers for samba and unix accounts (using expect instead of PAM). Not sure if it's OK to attach lots of files to list posts.
The attachments are scrubbed off mailing list posts, to end up in locations such as the following:
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/Dt/xTBRWwgv/rcm.multipassword.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
I think it's OK to attach multiple files to a list post.
Kind regards,
Jeroen van Meeuwen
On 23.02.2012 00:09, Andy Theuninck wrote:
I modified my install so that the password plugin could use multiple drivers. Email is by far the service my users use the most, but it would be nice to keep their all their passwords in sync when the email password changes. The main change is that the save function loops through all selected drivers instead of just one. To avoid function name collisions, drivers can optionally use a prefix (e.g., sql_save_password instead of save_password).
There's password_change hook executed on successful password change. So, you can write a separate plugin.
I also have password plugin drivers for samba and unix accounts (using expect instead of PAM). Not sure if it's OK to attach lots of files to list posts.
No problem with that. You can open a ticket in trac too.
RE: LDAP: I haven't looked at it closely, but if the ldap and ldap_simple drivers have separate configuration settings, you could enable both and manage two accounts that way.
RE: Separate plugin via hook: The name collision thing still happens because of how password is currently implemented. My secondary plugin could have copies of all password's driver files that are identical other than having unique function names, but that seems messy from a code maintenance standpoint.
I'll post the other drivers on trac
On Thu, Feb 23, 2012 at 2:51 AM, A.L.E.C alec@alec.pl wrote:
On 23.02.2012 00:09, Andy Theuninck wrote:
I modified my install so that the password plugin could use multiple drivers. Email is by far the service my users use the most, but it would be nice to keep their all their passwords in sync when the email password changes. The main change is that the save function loops through all selected drivers instead of just one. To avoid function name collisions, drivers can optionally use a prefix (e.g., sql_save_password instead of save_password).
There's password_change hook executed on successful password change. So, you can write a separate plugin.
I also have password plugin drivers for samba and unix accounts (using expect instead of PAM). Not sure if it's OK to attach lots of files to list posts.
No problem with that. You can open a ticket in trac too.
-- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net]
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl _______________________________________________ List info: http://lists.roundcube.net/dev/ BT/b5e129c4
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/Gh/SYqmg1QJ/new-drivers.tar.gz Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/ BT/aba52c80
On 23.02.2012 16:24, Andy Theuninck wrote:
The name collision thing still happens because of how password is currently implemented.
Fixed in r5902. Please, update your drivers.
Cool. I'll update my trac posted drivers with the same class format.
On Fri, Feb 24, 2012 at 4:15 AM, A.L.E.C alec@alec.pl wrote:
On 23.02.2012 16:24, Andy Theuninck wrote:
The name collision thing still happens because of how password is currently implemented.
Fixed in r5902. Please, update your drivers.
-- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net]
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl _______________________________________________ List info: http://lists.roundcube.net/dev/ BT/b5e129c4
List info: http://lists.roundcube.net/dev/ BT/aba52c80