0

Python 2.7を実行しているLinuxでdjango 1.6でdjango-auth-ldap(1.2.0)を使用すると、次の警告が表示されます。

The use of AUTH_PROFILE_MODULE to define user profiles has been deprecated.
  profile = self._user.get_profile()

私のsettings.pyにはLDAP設定が含まれています:

import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType

# Keep ModelBackend around for per-user permissions and maybe a local
# superuser.
AUTHENTICATION_BACKENDS = (
    'django_auth_ldap.backend.LDAPBackend',
    'django.contrib.auth.backends.ModelBackend',
)

AUTH_LDAP_SERVER_URI = "ldap://127.0.0.1"
AUTH_LDAP_BIND_DN = "cn=ram Krishna,ou=users,dc=test,dc=com"
AUTH_LDAP_BIND_PASSWORD = "ram"
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=test,dc=com",
                                   ldap.SCOPE_SUBTREE, "(uid=%(user)s)")

この py ファイルには LDAP の他の設定はありません

ldapsearch -x を使用した私の slapd エントリには次のように表示されます。

# ram Krishna, users, test.com
dn: cn=ram Krishna,ou=users,dc=test,dc=com
cn: ram Krishna
mail: ram@y.com
givenName: ram
sn: Krishna
objectClass: inetOrgPerson
objectClass: top
uid: ram

認証できないのはなぜですか?

4

1 に答える 1