Re: ldapquery plugin questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>> Hello,
>>>> I'm using SM 1.4.6, PHP 4.4.0, ldapquery plugin v. 2.1, NOT using an
>>>> ldap database backen.  My question is this:
>>>> The management here want a way to have the user DN field auto-
>>>> populated based on email address that signed in.  So that leads
>>>> me to
>>>> two problems, number 1 the PHP scripting.  I have very little
>>>> experience with PHP so I wouldn't even know where to start.
>>>> Secondly
>>>> the user DN field is the users common name, not email address -
>>>> so is
>>>> there a way to take the users email address, check the ldap
>>>> directory
>>>> and pull the CN?
>>>>
>>>> Any help would be appreciated.
>>>> Matt
>>>>
>>>
>>> Okay, so I have part of it figured out.  1) I edited ldapquery.php
>>> and added
>>>   $ldq_rdn = "cn=".$ldq_rdn
>>> so now I don't have to type the CN=
>>> 2) I discovered the joy of aliases, but the problem is I can't seem
>>> to find how to pass the required -a find argument to the ldapsearch
>>> command.  Any ideas on that part?
>>
>>
>> user is authenticated in ldap_bind() call and not in ldap_search().
>>
>>
>> --
>> Tomas
>>
> Right, I think I'm completely off on this though.  The alias doesn't
> seem to work the way I really want it to.  What I ultimately would
> like it to do is this:
>
> I would like the alias
> dn: cn=johndoe[@]cmcflex.com,ou=cmc,dc=cmcflex,dc=com
> objectClass: alias
> objectClass: extensibleObject
> cn: johndoe[@]cmcflex.com
> aliasObjectname: cn=john doe,ou=cmc,dc=cmcflex,dc=com
>
> to redirect to this (including password)
>
> dn: cn=john doe,ou=cmc,dc=cmcflex,dc=com
> ou: cmc
> cn: john doe
> objectClass: top
> objectClass: person
> objectClass: organizationalPerson
> objectClass: inetOrgPerson
> givenName: John
> sn: Doe
> mail: johndoe[@]cmcflex.com
> userPassword: xxxxxxx
>
> but the problem I'm running into is that I can't authenticate using
> "cn=johndoe[@]cmcflex.com,ou=cmc,dc=cmcflex,dc=com" with the password
> for the actual user "cn=john doe,ou=cmc,dc=cmcflex,dc=com"
>
> I think I need to play with SASL? - but holy crap . . .

you don't have too.

SquirrelMail 1.5.1+ contains change_password plugin that implements
similar feature in ldap backend.

In order to login with user password, plugin should bind with some
preconfigured username and retrieve correct dn by searching for username.
Once you have user's binddn, you can rebind with that dn and user's
password.

-- 
Tomas


--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux