mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 01:16:01 +03:00
[GH-ISSUE #2372] LDAP: Error in creating/updating userPassword #1583
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1583
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexcustos on GitHub (Oct 8, 2021).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2372
Impacted versions
Steps to reproduce
Current behavior
This is not how the password is supposed to be created/updated in LDAP. This code extracts the SHA512-CRYPT string and sends it to LDAP. I debugged it for a while, and
force_bytes("plain_text_password")instead of thepasswordvariable does the job.Expected behavior
I expect a proper password to be sent to LDAP to allow other clients to use it as well.
@tonioo commented on GitHub (Oct 14, 2021):
Plain text password is not available in the database and OpenLDAP (at least) is supposed to understand the way password are stored in modoboa because we use the same format...
@alexcustos commented on GitHub (Oct 14, 2021):
Not far from the LDAP sync handler, there's a
raw_valuevariable (core/models.py). It looks like a raw password that can be passed down to the handler. I guess it's how it's supposed to work. Otherwise, LDAP synchronization doesn't make any sense. Modoboa can authenticate against Plain and SSHA hashed passwords in LDAP but saves back gibberish.@tonioo commented on GitHub (Oct 19, 2021):
The raw value you're talking about is only available when you set a new password. When do you any other kind of modification, then we don't have it. Could it be possible that your LDAP tries to hash the password sent by modoboa once again?
@alexcustos commented on GitHub (Oct 19, 2021):
But what needs to update passwords otherwise? The use case is simple. I want Modoboa to maintain LDAP users that I can use to auth to Nextcloud, for example. In other words, when I create a new user or update its password, I expect Modoboa to sync the provided passwords with LDAP.
Sure, LDAP hashes passwords with SSHA or writes them as Plain text, depending on the settings, but that's not the problem. Why would anyone want to teach external services to authenticate with Modoboa hash instead of the password itself?
@stale[bot] commented on GitHub (Dec 18, 2021):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.