I'm using django-auth-ldap for auth backend in a Django project. But I have a problem, I can't give any permissions to a user before user once logged in. Because the user object created when user tring login to system.
I want to write a task to populate user from ldap periodically, how I can do that. I can't just login for each unpopulated user since I don't know their passwords.
I found out I just can populate user like this:
from django_auth_ldap.backend import LDAPBackend
ldap_backend = LDAPBackend()
ldap_backend.populate_user('username')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With