Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I understand that if you try to authenticate with an email address e.g. me@server.com, 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 me@gmail.com) 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.

share|improve this question

1 Answer 1

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:

emailAddress=me@gmail.com

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 emailAddress=me@gmail.com, and log in user me using that address.

-danny

share|improve this answer
    
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 '11 at 8:35
    
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 '11 at 21:08
    
Thanks @dannyman –  Haddad Mar 10 '11 at 9:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.