Displaying 3 results from an estimated 3 matches for "gen_salt".
Did you mean:
gen_call
2017 Oct 04
3
moving from mysql to pgsql
...ady.
a login mws at alpenjodel.de Test
OK
Now let's take a look at the pgsql version of the setup:
dovecot-sql.conf.ext:
driver = pgsql
default_pass_scheme = SHA512-CRYPT
Users are created like this:
INSERT INTO mls_user (idx,domain,password,email)
VALUES (1,99,crypt('Test',gen_salt('des')),'mws at alpenjodel.de');
This setup is not working:
$ telnet localhost 143
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID
ENABLE IDLE AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5
AUTH=CRAM-MD5] Dovecot ready.
a login mws at alpenjodel.de Test
a NO [AUTHENTI...
2017 Oct 06
0
moving from mysql to pgsql
...fied base64; and
2) this appears to compute the SHA512 hash, *not* the
SHA512-Crypt hash, which is different. It involves
adding a salt and doing many iterations of SHA512.
A totally different algorithm.
Perusing the PostgreSQL man pages, I think you need something like
crypt(password,gen_salt('sha512'))
I made the 'sha512' up -- I can't find PostgresSQL docs stating whether
it supports this value. The docs I found support the older SHA1
($5$) crypt hashes. If your version doesn't support creating SHA512
($6$) salts, you can create your own by replacing gen_sal...
2017 Oct 04
0
moving from mysql to pgsql
...Now let's take a look at the pgsql version of the setup:
>
> dovecot-sql.conf.ext:
>
> driver = pgsql
> default_pass_scheme = SHA512-CRYPT
>
> Users are created like this:
>
> INSERT INTO mls_user (idx,domain,password,email)
> VALUES (1,99,crypt('Test',gen_salt('des')),'mws at alpenjodel.de');
>
> This setup is not working:
>
> $ telnet localhost 143
> * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID
> ENABLE IDLE AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5
> AUTH=CRAM-MD5] Dovecot ready.
>
> a login m...