After two hours of reading documentation, source code and help-threads, I'm giving up. I can't get psycopg2 to authenticate with a md5-string. According to this thread I don't have to anything besides enabling md5-auth in pg_hba.conf
.
This is my current pg_hba.conf
:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
host all all 0.0.0.0/0 md5
And I use psycopg2 like this:
psycopg2.connect(host='localhost', port=5433, user='me', password='md5xxxx').cursor()
Which gives:
psycopg2.OperationalError: FATAL: password authentication failed for user "me"
Naturally, the given password matches with pg_authid.rolpassword.
According to pg_hba.conf
I can only login using md5-auth (right?). Still, my unhashed password works fine (and hashed doesn't) and I'm unable to find any references to psycopg2 hashing it in its source code.
Help?
Thanks!