[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Help: LDAP Authentication

Sukanya Belsare wrote:
> In my windows GUI, for getting the search results from an LDAP server,
> along with the search filter the user enters the
> LDAP server name,
> LDAP port number,
> user-name for authentication and
> password.
> The function ldap_simple_bind_s() requires that distinguished name be
> supplied for the user-name.
> How to get the user-name's distinguished name when all I 
> know is just the above 4 parameters?

Perform an anonymous bind and search for the UID (or cn
or whatever).  Of course, you need to have the access control
to allow this and know the seach base.  I would recommend 
you look at the PADL pam_ldap module source code for examples.

Cheers, jerry
   /\  Gerald (Jerry) Carter                     Professional Services
 \/    http://www.valinux.com/  VA Linux Systems   gcarter@valinux.com
       http://www.samba.org/       SAMBA Team          jerry@samba.org
       http://www.plainjoe.org/                     jerry@plainjoe.org

       "...a hundred billion castaways looking for a home."
                                - Sting "Message in a Bottle" ( 1979 )