Hi L,
Thanks for your reply.
I’m through pip to install the django-auth-ldap already. But there are two question here.
1. How can I check the django-auth-ldap version?
2. What do you mean of install via virt env? I’m follow the edX Ubuntu 12.04 +64 bit installation guide to install the edX, is that virt env?
https://github.com/edx/configuration/wiki/edX-Ubuntu-12.04-64-bit-Installation
-----------------------------------------------------------------------------------------
root@ethiopia:/edx/app/edxapp/edx-platform/lms/envs# pip install django-auth-ldap
Requirement already satisfied (use --upgrade to upgrade): django-auth-ldap in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): django in /usr/local/lib/python2.7/dist-packages (from django-auth-ldap)
Requirement already satisfied (use --upgrade to upgrade): python-ldap>=2.0 in /usr/local/lib/python2.7/dist-packages (from django-auth-ldap)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from python-ldap>=2.0->django-auth-ldap)
Cleaning up...
Thanks and Regards,
Terence Yip
>>> import django_auth_ldap
>>> django_auth_ldap.version
(1, 1, 2)
>>>
As for virtualenv, it's a good practice but it's not necessary.
By the way, have you tried performing a simple search on the LDAP server? I think that your best bet is to start with python-ldap (forget about django_auth_ldap), try to connect to the server, perform a bind and get a feel for it.
I normally open the shell and run something like this in it https://bpaste.net/show/d4348eb1b3dd
You have to know the following:
- protocol (secure or not)
- IP or domain name of the LDAP server
- port
- A full DN of one of the users would be useful but once you establish the connection you can figure this out.
I remember that I was using Django 1.5.x and django_auth_ldap was still using User model by default. Not sure if that's still the case but you may have to patch it.
Good luck!
M
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ee41bfae-4c40-43dc-83c0-d04ddbd6133f%40googlegroups.com.
AUTH_LDAP_USER_SEARCH = LDAPSearch('OU=Users,DC=abc,DC=hk', ldap.SCOPE_SUBTREE, "(&(mail=u...@abc.hk)(objectClass=User)(objectCategory=person))")
if db_profile is user:
if db_profile is None:
Eucalyptus.1 | 2016-08-26 | open-release/eucalyptus.1 |
if not db_profile:
####Checking the log file in Terminal
logger = logging.getLogger('django_auth_ldap')
logger.addHandler(logging.StreamHandler())
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/70160318-c830-4bfe-bf21-61c663c869d9n%40googlegroups.com.