2

I understand that if you try to authenticate with an email address e.g. [email protected], ldap assumes there is a user "me" in a domain "server.com" (i.e DC=com,DC=server) in the ldap directory.

I wonder if it is possible at all to have users use their own email accounts (like [email protected]) to login to my ldap server even though I don't have all ther email address domain names defined as domains in my ldap directory?

Any pointers appreciated.

1 Answer 1

3

This question probably needs more specifics, like what software is performing the auth, what LDAP server is it authing against? Generally speaking, you can do whatever the heck you want to allow yourself to do in LDAP.

My think would be:

dn: uid=me,dc=server,dc=com

And then me has an attribute:

[email protected]

for this latter case, if you were using Apache to auth, you might have a configuration like this:

AuthType Basic
AuthName "Log in with your e-mail address"
AuthBasicProvider ldap
AuthLDAPURL "ldap://ldap.example.com/dc=example,dc=com?emailAddress"
require valid-user

Here, Apache would search for a user with [email protected], and log in user me using that address.

-danny

2
  • Thanks for the reply @dannyman, the server options are openldap or Microsoft's Active Drirectory, in the end the software that will be perfoming the authentication will be a php client (Zend_Auth to be specific), however I want to know a general way of authenticating users with their emails which I can use for any ldap client. Thanks
    – Haddad
    Mar 9, 2011 at 8:35
  • 1
    Haddad: So, looking at framework.zend.com/manual/en/zend.auth.adapter.ldap.html, the accountFilterFormat option could be used to specify that your username is stored in something like emailAddress=%s.
    – dannyman
    Mar 9, 2011 at 21:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .