How to Disable Django's change password, forgot password

1,583 views
Skip to first unread message

LDAP Warrior

unread,
Mar 30, 2011, 10:40:07 AM3/30/11
to django-auth-ldap
I'm thinking a common change people using LDAP would want to make is
to disable Django's change password, and forgot password
functionality.

Do you guys know how to accomplish this in Django?

Thanks,

Greg

Peter Sagerson

unread,
Mar 30, 2011, 12:46:06 PM3/30/11
to django-a...@googlegroups.com
I believe you're correct, but I'm not aware of any way to do this. The fact that different backends handle password changes and resets differently isn't reflected in the auth plugin API, unfortunately.

Felipe Prenholato

unread,
Mar 30, 2011, 1:07:28 PM3/30/11
to django-a...@googlegroups.com

A simple solution is remove links from template.

Also, you can overwrite urls poiting to a 404 page or something similar.

But I'm thinking, why not django-auth-ldap provide a way of change password with ldap, is it possible? Exist a common method to do it?

Felipe 'chronos' Prenholato.
Linux User nº 405489
Home page: http://chronosbox.org/blog
Twitter: http://twitter.com/chronossc



2011/3/30 Peter Sagerson <psa...@ignorare.net>

Jeff Schroeder

unread,
Mar 30, 2011, 1:14:41 PM3/30/11
to django-a...@googlegroups.com, Felipe Prenholato
As a reference: For GNOME, we do it this way:
http://git.gnome.org/browse/sysadmin-bin/tree/handle-ldap-modules#n95
http://git.gnome.org/browse/sysadmin-bin/tree/handle-ldap-modules#n403

That works perfectly with openldap and user passwords in SSHA (sha1) format.

--
Jeff Schroeder

Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com

Peter Sagerson

unread,
Mar 30, 2011, 1:28:48 PM3/30/11
to django-a...@googlegroups.com
There's no way to handle password changes through the plugin API, so it would be an entirely separate feature. I actually had this need myself and ended up writing a separate Django app for my site to handle account management. The main reason is that--at least with my configuration--any changes require the user's password, which django_auth_ldap scrupulously does not retain. So I basically wrote an app that keeps the user's password in the session and makes LDAP calls directly. LDAP is pretty easy to work with; I expect any password-management code in django_auth_ldap would just end up being a trivial wrapper around python-ldap.

Felipe Prenholato

unread,
Mar 30, 2011, 1:50:46 PM3/30/11
to django-a...@googlegroups.com, Peter Sagerson
For this kind of evolution I guess that project django-ldapdb is a good stuff, may a future merge between django-auth-ldap and django-ldapdb would be a ideal world hehe.

Django ldapdb offers a way to handle and query ldap like a normal django model, so implement more way to query stuff and a set_password method shouldn't be a hard work, what about?

Jeff Schroeder

unread,
Mar 30, 2011, 1:52:10 PM3/30/11
to django-a...@googlegroups.com
On Wed, Mar 30, 2011 at 10:50 AM, Felipe Prenholato
<phili...@gmail.com> wrote:
> For this kind of evolution I guess that project django-ldapdb is a good
> stuff, may a future merge between django-auth-ldap and django-ldapdb would
> be a ideal world hehe.
> Django ldapdb offers a way to handle and query ldap like a normal django
> model, so implement more way to query stuff and a set_password method
> shouldn't be a hard work, what about?
> django-ldapdb -> http://opensource.bolloretelecom.eu/projects/django-ldapdb/

These two projects are for completely separate things. It doesn't make
a lot of sense to merge them.

Di majo

unread,
May 12, 2024, 3:38:01 PM5/12/24
to django-auth-ldap
MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
LOAN DEAL
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
IPIP/DTC
SLBC PROVIDER
CREDIT CARD TOP UP
DUMPS/ PINS
SEPA TRANSFER
WIRE TRANSFER
BITCOIN TOP UP
GLOBALPAY INC US
SKRILL USA
UNIONPAY RECEIVER

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP
+44 7529 555638
Reply all
Reply to author
Forward
0 new messages