Roundcube Community Forum

Third Party Contributions => Old Style Plug-Ins => Topic started by: Darkside on July 31, 2007, 05:54:19 AM

Title: LDAP Patch ... Login, Identities and change password
Post by: Darkside on July 31, 2007, 05:54:19 AM
Hello@all!!

First: My english is very bad :( (my mother tongue is german ... i never learned english). Sorry for the broken english text.

I manage my Users in a LDAP Tree. The User have a unique ID and several email-addresses. My User can authenticate on IMAP via UID or all email-adresses.

I have roundcube modify to query login-user in a LDAP Tree and read the Identities (email-addresses) from LDAP Entry.
This patch based on SVN Snapshot 651 from 2007/07/03.

My Patch in detail:
by the way: i am a hobby coder ... not a profi.

The Patch can download here: http://download.schmidtie.de/roundcube/roundcube_ldap_1.0.diff (http://download.schmidtie.de/roundcube/roundcube_ldap_1.0.diff)

In the config/main.inc.php must set the follow entry:
Code: [Select]
$rcmail_config['ldap_user'] = array(
  'hosts'     => array('<ldapserver>'),
  'port'     => 389,             // optional ... default: 389
  'protocol'   => 3,              // optional ... (i have patched a bugfix? in rcube_ldap.inc row 88)
  'base_dn'    => '<basedn>',
  'bind_dn'    => '<binddn>',        // optional
  'bind_pass'   => '<bindpwd>',       // optional
  'userid_field' => '<fieldname of uid>',  // must!
  'email_field'  => '<fieldname with mail-addresses>', // must!
  'pwd_fields'  => array(
    '<fieldname of password>' => '<encryption method>'); // must ... one entry or a array with more as one password fields (my user-entry have a encypted and a clear password field)
  'scope'     => 'sub',            // search mode: sub|base|list
  'filter'    => '<ldap filter string>',    // the var '%u' changed to the username
  'fuzzy_search' => true);          // for the original ldap class from roundcube :)

encryption methods: (dependent from PHP config)

OK, thats all. I hope my text is a bit understandable :)

Andreas
Title: Re: LDAP Patch ... Login, Identities and change password
Post by: SKaero on July 31, 2007, 05:42:16 PM
Thanks I am shear this will come in handy for people will similar problems. ;)
Title: Re: LDAP Patch ... Login, Identities and change password
Post by: Naatan on August 31, 2007, 09:13:43 AM
I was searching for a plugin that does just this, only we use Active Directory at my work, and I didn't manage to get it working, which is weird since the address book does work, I just get a white page when I go to roundcube. I'll try patching RC1 later (using SVN version now).

I sincerely hope this feature will be added to roundcube natively.
Title: Re: LDAP Patch ... Login, Identities and change password
Post by: dresdn on September 14, 2007, 01:38:23 PM
Darkside:

Thanks for the patch! I had a lot of problems getting it to work out of the gate, so I took some time and cleaned it up. To be honest, Darkside's patch shouldn't work at all as it's missing the random_salt() method from phpLDAPAdmin, so I added that. ;)

This patch works with 1.0-rc1. Just follow the steps from Darkside about putting information in the config/main.inc.php, and you'll be good to go. If you have problems, just change the $rcmail_config['debug_level'] to 4 and give it a whirl (I had a typo in my LDAP username >:( )

Anyways, enjoy and let me know if there are any problems with it!

-Dresdn
Title: Re: LDAP Patch ... Login, Identities and change password
Post by: srenon on December 11, 2007, 12:22:01 PM
Did someone have a similar patch for RC2?

Thanks
Title: LDAP Patch ... Login, Identities and change password
Post by: lacri on January 14, 2009, 07:31:03 AM
hi all
sorry for my bad english

i need this features for RC 2 stable

plz help