On 03/02/10 14:45, andreas schmid wrote:

     AUTH_LDAP_BIND_DN = ""
     AUTH_LDAP_BIND_PASSWORD = ""
     AUTH_LDAP_USER_SEARCH = LDAPSearch("dc=example,dc=com",
         ldap.SCOPE_SUBTREE, "(uid=%(user)s)")


You're using uid here, but

     # Set up the basic group parameters.

     # Populate the Django user from the LDAP directory.
     AUTH_LDAP_USER_ATTR_MAP = {
         "username": "sn"

sn here.  I really doubt that'll work unless your ldap directory
happens to have uid==sn for all relevant entries (which would
be weird and unusual, but not strictly impossible)

Try uid in both.  I think you were heading
that way with your question regarding AUTH_LDAP_USER_ATTR_MAP anyway.

sn in both is less likely to be what you want, usually surnames
can violate typical username constraints and be non-unique.

> no users in the db,

Well, n.b. that probably won't happen until you actually try to log in
as a particular ldap user.

django-auth-ldap apparently has a dedicated list, might reach
people with more familiarity with it, I'm not sure what else might
be wrong with your config:
http://bitbucket.org/psagers/django-auth-ldap/wiki/Home
(n.b. I inadvertently linked to a fork in last post)

> how can i check if i am connected or not?

One thing to bear in mind   -
./manage.py shell
allows you to poke about interactively "within" your django project
(though not the live web server as such). You can execute individual methods and try stuff out.



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to