Hi Cody,

I am also using a Search Bind in a similar situation as yours.... You could
easily use the samaccountName for User Search.

Here is what I have in settings.py to give you a clearer picture.

AUTH_LDAP_USER_SEARCH = LDAPSearchUnion(
>     LDAPSearch("OU=Users,
> OU=Central,OU=IDD,DC=client,DC=corp",ldap.SCOPE_SUBTREE,
> "(sAMAccountName=%(user)s)"),
>
> LDAPSearch("OU=Users,OU=Renca_CD,OU=Locales,OU=IDD,DC=client,DC=corp",ldap.SCOPE_SUBTREE,
> "(sAMAccountName=%(user)s)"),
>     )


And yes, the user in %(user)s comes from the login form.

Regards,
Guddu

On Tue, May 14, 2013 at 2:52 PM, Cody Scott <cody.j.b.sc...@gmail.com>wrote:

> I am trying to get django-auth-ldap working with an Active Directory LDAP
> Server.
>
> I don't understand the documentation for the Search/Bind or Direct Bind.
>
> Is 'uid' the LDAP attribute uid? My LDAP doesn't use this attribute.
>
> I tried putting 'samaccountName' an attribute that is used for logon.
>
> Where does the 'user' come from? Is that the username field from the login
> form?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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


Reply via email to