[GH-ISSUE #1564] [MD5-CRYPT] imported password do not work. #1231

Closed
opened 2026-02-27 11:16:00 +03:00 by kerem · 13 comments
Owner

Originally created by @stefaweb on GitHub (Sep 3, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1564

Impacted versions

  • Modoboa: 1.10.6
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Imported accounts with [MD5-CRYPT] don't work. The account is well created but login failed.

/var/log/mail.log:

Sep 3 18:51:37 modoboa dovecot: auth-worker(25093): Error: sql(man@domain.tld,xx.xx.xx.xx,<ptTDWvp0eJ0+0qZC>): Invalid password in passdb: Not a valid MD5-CRYPT or PLAIN-MD5 password

From imported cvs:

account;man@domain.tldr;[MD5-CRYPT]c3af58603be288769bb31d980bb74abc;;;True;SimpleUsers;man@domain.tld;102

Am I wrong somewhere?

Originally created by @stefaweb on GitHub (Sep 3, 2018). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1564 # Impacted versions * Modoboa: 1.10.6 * installer used: Yes * Webserver: Nginx # Steps to reproduce Imported accounts with [MD5-CRYPT] don't work. The account is well created but login failed. /var/log/mail.log: `Sep 3 18:51:37 modoboa dovecot: auth-worker(25093): Error: sql(man@domain.tld,xx.xx.xx.xx,<ptTDWvp0eJ0+0qZC>): Invalid password in passdb: Not a valid MD5-CRYPT or PLAIN-MD5 password` From imported cvs: `account;man@domain.tldr;[MD5-CRYPT]c3af58603be288769bb31d980bb74abc;;;True;SimpleUsers;man@domain.tld;102 ` Am I wrong somewhere?
kerem closed this issue 2026-02-27 11:16:00 +03:00
Author
Owner

@stefaweb commented on GitHub (Sep 3, 2018):

Found. Can't work when we use [] instead of {}

I close.

<!-- gh-comment-id:418179094 --> @stefaweb commented on GitHub (Sep 3, 2018): Found. Can't work when we use `[]` instead of `{}` I close.
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

Hello!

I reopen this issue.

I corrected my export code to use brackets instead of quote but the problem is still here.

account;man@domain.tldr;{MD5-CRYPT}c3af58603be288769bb31d980bb74abc;;;True;SimpleUsers;man@domain.tld;102

The password was generated with the php md5() command.

<!-- gh-comment-id:418257385 --> @stefaweb commented on GitHub (Sep 4, 2018): Hello! I reopen this issue. I corrected my export code to use brackets instead of quote but the problem is still here. `account;man@domain.tldr;{MD5-CRYPT}c3af58603be288769bb31d980bb74abc;;;True;SimpleUsers;man@domain.tld;102` The password was generated with the php md5() command.
Author
Owner

@tonioo commented on GitHub (Sep 4, 2018):

The format was indeed wrong. And you still have an issue since you selected the wrong scheme. If passwords were generated using the md5 php function then you should select MD5. FYI, this is a weak encryption mechanism and you should move to MD5-CRYPT which is far more secure.

<!-- gh-comment-id:418261962 --> @tonioo commented on GitHub (Sep 4, 2018): The format was indeed wrong. And you still have an issue since you selected the wrong scheme. If passwords were generated using the md5 php function then you should select MD5. FYI, this is a weak encryption mechanism and you should move to MD5-CRYPT which is far more secure.
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

Sorry but I don't understand, do you mean {MD5} ?

<!-- gh-comment-id:418264370 --> @stefaweb commented on GitHub (Sep 4, 2018): Sorry but I don't understand, do you mean `{MD5}` ?
Author
Owner

@tonioo commented on GitHub (Sep 4, 2018):

Yes.

<!-- gh-comment-id:418267291 --> @tonioo commented on GitHub (Sep 4, 2018): Yes.
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

I tried, still doesn't work.

<!-- gh-comment-id:418267805 --> @stefaweb commented on GitHub (Sep 4, 2018): I tried, still doesn't work.
Author
Owner

@tonioo commented on GitHub (Sep 4, 2018):

And make sure the "Crypt passwords" checkbox is not checked.

<!-- gh-comment-id:418268231 --> @tonioo commented on GitHub (Sep 4, 2018): And make sure the "Crypt passwords" checkbox is not checked.
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

"Crypt passwords" is not checked in import page.

<!-- gh-comment-id:418269186 --> @stefaweb commented on GitHub (Sep 4, 2018): "Crypt passwords" is not checked in import page.
Author
Owner

@tonioo commented on GitHub (Sep 4, 2018):

I remember MD5 passwords must be base64 encoded (dovecot requirement). Is it the case?

<!-- gh-comment-id:418273951 --> @tonioo commented on GitHub (Sep 4, 2018): I remember MD5 passwords must be base64 encoded (dovecot requirement). Is it the case?
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

No, basic md5() without salt or base64 encoding.

<!-- gh-comment-id:418275718 --> @stefaweb commented on GitHub (Sep 4, 2018): No, basic md5() without salt or base64 encoding.
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

I'll try later to base64 encode the md5 password. I'll let you know.

<!-- gh-comment-id:418277713 --> @stefaweb commented on GitHub (Sep 4, 2018): I'll try later to base64 encode the md5 password. I'll let you know.
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

I encoded the md5 password with base64. Still do not work.

<!-- gh-comment-id:418284395 --> @stefaweb commented on GitHub (Sep 4, 2018): I encoded the md5 password with base64. Still do not work.
Author
Owner

@stefaweb commented on GitHub (Sep 4, 2018):

Found.

I made an error when trying the connexion. I navigator autocomplete was not entering the right password.

It work with {MD5} and regular MD5 scheme. No need to base64 encode (does't work).

I close this time. Thanks.

ps: vacation api for modoboa. Any new?

<!-- gh-comment-id:418286744 --> @stefaweb commented on GitHub (Sep 4, 2018): Found. I made an error when trying the connexion. I navigator autocomplete was not entering the right password. It work with {MD5} and regular MD5 scheme. No need to base64 encode (does't work). I close this time. Thanks. ps: vacation api for modoboa. Any new?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1231
No description provided.