pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerardo Herzig <gherzig@fmed.uba.ar>
To: postgres list <pgsql-sql@postgresql.org>
Subject: create user xxx with md5 string?
Date: Thu, 03 Dec 2009 15:05:02 -0300
Message-ID: <4B17FDCE.6030200@fmed.uba.ar> (raw)

Hi all. Im triyng, with no success, to create a user, and set the
password with a md5 string.

I did this:

comechingon:~ # echo -n 123 | md5sum
202cb962ac59075b964b07152d234b70  -


Ok, so then
test=# CREATE USER foobar ENCRYPTED PASSWORD
'md5202cb962ac59075b964b07152d234b70'; --I have to add 'md5' at the
begging of the string
CREATE ROLE


test=# SELECT * from pg_shadow where usename='foobar';
 usename | usesysid | usecreatedb | usesuper | usecatupd |
 passwd                | valuntil | useconfig
---------+----------+-------------+----------+-----------+-------------------------------------+----------+-----------
 foobar  |  3250592 | f           | f        | f         |
md5202cb962ac59075b964b07152d234b70 |          |
(1 row)

test=# \c test foobar
Password for user foobar: [123, off course]
FATAL:  password authentication failed for user "foobar"
Previous connection kept

test=# SHOW server_version;
 server_version
----------------
 8.3.6

Im wondering which my mystake is:
Using md5sum?

I do have 'md5' as validation mechanism in pg_hba.conf

Any hints?
Thanks!

Gerardo



view thread (5+ messages)  latest in thread

Message-ID: <4B17FDCE.6030200@fmed.uba.ar>
Permalink:  ../4B17FDCE.6030200@fmed.uba.ar/
Also on:    postgresql.org/message-id/4B17FDCE.6030200@fmed.uba.ar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gherzig@fmed.uba.ar
  Subject: Re: create user xxx with md5 string?
  In-Reply-To: <4B17FDCE.6030200@fmed.uba.ar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox