Questions tagged [django-auth-ldap]

django-auth-ldap is a pluggable Django app that provides an authentication backend that authenticates against an LDAP service

django-auth-ldap is a pluggable Django app that provides an authentication backend that authenticates against an LDAP service.

See also:

103 questions
1
vote
0 answers

setting user model ID with django ldap auth

I'm using django-auth-ldap for my django auth, with on-the-fly user creation. In my settings.py AUTHENTICATION_BACKENDS = ( 'django_auth_ldap.backend.LDAPBackend', 'django.contrib.auth.backends.ModelBackend', ) AUTH_LDAP_USER_SEARCH =…
Jocelyn delalande
  • 5,123
  • 3
  • 30
  • 34
1
vote
1 answer

Django - separate authentication backend code from implementation

What is the best way to separate your authentication backend logic from code which is inherently dependent on it? Here's a common problem: django_auth_ldap does not prepopulate the users table, but rather authenticates against LDAP and adds users to…
OEP
  • 448
  • 2
  • 11
0
votes
0 answers

Can I change ldap settings like url, password from my app without restarting Django server

I am using Django-auth-ldap to authenticate ldap users into my app. I need to change the ldap settings like SERVER_URI, bind_dn, password etc from my app while Django server is running. Can I override settings method from…
0
votes
1 answer

Is there a way to make my authentication accept both email or username values for user log-in

I am working on a django authentication project, where I want to authenticate using both email and username for authentication. The model is class LinksUser(AbstractBaseUser, PermissionsMixin): objects = LinksUserManager() full_name =…
0
votes
0 answers

New users which are created by django-windowsauth upon first login are saved as DOMAIN\USERNAME, How can I change the default to USERNAME?

I'm creating a website with django for the first time and I needed the users to be authenticated with Active Directory so I used django-windowsauth package, but now when someone logs in for the first time their username is in DOMAIN\USERNAME format,…
0
votes
0 answers

Django - MS Active Directory authentification using django-auth-ldap

I almost broke my mind trying to adjust my test django project to connect with my Active Directory. The goal is to create a simple login page that will check credentials with AD users data. AD located on the same machine as Django. AD users involved…
0
votes
0 answers

Unable to retrive Active Driectory groups for a user

I have a Django Rest Framework App with simple JWT Token and LDAP authentication configured. I'm trying to allow users based on the LDAP security group that they belong to. I've done the below: settings.py AUTH_LDAP_SERVER_URI =…
0
votes
1 answer

Switching from LDAP to AD LDAPS using Python Django

Converting authentication from LDAP to AD LDAPS Python + Django ============== Following Django Docs: https://django-auth-ldap.readthedocs.io/en/latest/authentication.html OLD: AUTH_LDAP_SERVER_URI =…
Crunchy
  • 186
  • 10
0
votes
0 answers

show or know LDAP attributes in django

I have a project in django where i try to connect with ldap server. All seems works well, because when i login in django, the user is added to the django database. The problem is that I made a custom user with the department field in django and I…
garvarma
  • 13
  • 1
  • 4
0
votes
1 answer

Invalid object name 'table'

I have a few bases in my project. Hence I need to redefine methods which get some information from base. Everything had worked fine until I decided to authorize via active directory. Finally I get this: authorization works (default database),…
0
votes
0 answers

How to pull all users from ad and store them in database by using Django Auth LDAP

I am Using Django 4.4, I have managed to authenticate users by using django-auth-ldap.But I can not get all users records to my database. I have tried to follow instructions from this link using the filter (sAMAccountType=805306368), It gives all…
0
votes
1 answer

django_auth_ldap can't use populate_user signal

Trying to use the populate_user signal to do some custom processing but no effect. from django.dispatch import receiver from django_auth_ldap.backend import populate_user, LDAPBackend @receiver(populate_user, sender=LDAPBackend) def…
sol
  • 15
  • 1
  • 5
0
votes
1 answer

Context not passed to overwritten templates

Django version 3.2.4 I'm trying to change the default index_title, site_header, and site_title used by the admin site. I've tried all the suggestions here, but the login page refuses to use the updated values. In fact, the required context…
ubiquibacon
  • 10,451
  • 28
  • 109
  • 179
0
votes
0 answers

Automatic ldap login is possible using django-auth-ldap package?

how to achieve automatic ldap login in django application? is it possible by using django-auth-ldap package?
Mac
  • 11
  • 2
0
votes
1 answer

django-auth-ldap: LDAPS causes the first login attempt to fail

I have configured django-auth-ldap with with the ldap protocol (unencrypted) to authenticate against an Active Directory instance, and it works. The problem is when I attempt to connect via ldaps, then the first authentication attempt always fails,…
phantom-99w
  • 928
  • 1
  • 11
  • 22