I have a mail server that stores passwords for mailboxes in a mysql database with the following sql:
ENCRYPT([PASSWORT], concat(_utf8"$1$", right(md5(rand()), 8), _utf8"$"))
But there is no salt in the database.
Now I need to create a login process to this database, but it's hard to compare the saved password due to the missing salt. I noticed that the password hash contains salt in the following form:
$1$[SALT]$[PASSWORD-HASH]
How to create a comparable password hash to create a login?
Dovecot can connect to users using stored passwords, but how?
source share