pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
lost password
4+ messages / 2 participants
[nested] [flat]

* lost password
@ 2009-11-17 21:20 Edward W. Rouse <erouse@comsquared.com>
  2009-11-17 21:43 ` Re: lost password Edward W. Rouse <erouse@comsquared.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Edward W. Rouse @ 2009-11-17 21:20 UTC (permalink / raw)
  To: pgsql-sql

I have a database that has a "process" user. I need to move the database to
an additional server. When I restore it gave me a "user not found" error. So
I am trying to recreate this user, but no one knows what the password is
supposed to be. The processes connecting to it have encrypted versions of
the password. And what I can find in the database uses md5. Is there some
way to find out or copy over the users password? Trying to find every
process that uses this login will be very time consuming and we are
guaranteed to miss some and generate a lot of frustration and confusion as
processes that always worked cease. Not to mention that some stuff may be
failing for a while before someone catches it.

 

I was thinking of just taking the md5 from pg_authid:rolpassword and using
it to update the new server. Will this work? Or is there another way to
retrieve a forgotten password?

 

Edward W. Rouse

Comsquared System, Inc.

770-734-5301

 

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: lost password
  2009-11-17 21:20 lost password Edward W. Rouse <erouse@comsquared.com>
@ 2009-11-17 21:43 ` Edward W. Rouse <erouse@comsquared.com>
  2009-11-17 23:56   ` Re: lost password Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Edward W. Rouse @ 2009-11-17 21:43 UTC (permalink / raw)
  To: 'Edward W. Rouse' <erouse@comsquared.com>; pgsql-sql

Well I quickly found out 2 things:

 

1.       You can copy the md5 over and have it work

2.       The same password can have different md5's

 

After I copied the md5 over I played around a bit and found the for the
process user. I then used the alter user sql statement and rechecked the
md5. It was different, but I could still use the same password to log in.
Needless to say, I am a bit confused by that, but it works and that's what I
need.

 

Edward W. Rouse

 

From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Edward W. Rouse
Sent: Tuesday, November 17, 2009 4:21 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] lost password

 

I have a database that has a "process" user. I need to move the database to
an additional server. When I restore it gave me a "user not found" error. So
I am trying to recreate this user, but no one knows what the password is
supposed to be. The processes connecting to it have encrypted versions of
the password. And what I can find in the database uses md5. Is there some
way to find out or copy over the users password? Trying to find every
process that uses this login will be very time consuming and we are
guaranteed to miss some and generate a lot of frustration and confusion as
processes that always worked cease. Not to mention that some stuff may be
failing for a while before someone catches it.

 

I was thinking of just taking the md5 from pg_authid:rolpassword and using
it to update the new server. Will this work? Or is there another way to
retrieve a forgotten password?

 

Edward W. Rouse

Comsquared System, Inc.

770-734-5301

 

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: lost password
  2009-11-17 21:20 lost password Edward W. Rouse <erouse@comsquared.com>
  2009-11-17 21:43 ` Re: lost password Edward W. Rouse <erouse@comsquared.com>
@ 2009-11-17 23:56   ` Tom Lane <tgl@sss.pgh.pa.us>
  2009-11-18 15:10     ` Re: lost password Edward W. Rouse <erouse@comsquared.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2009-11-17 23:56 UTC (permalink / raw)
  To: Edward W. Rouse <erouse@comsquared.com>; +Cc: pgsql-sql

"Edward W. Rouse" <erouse@comsquared.com> writes:
> After I copied the md5 over I played around a bit and found the for the
> process user. I then used the alter user sql statement and rechecked the
> md5. It was different, but I could still use the same password to log in.
> Needless to say, I am a bit confused by that, but it works and that's what I
> need.

The md5 will depend on both the actual password and the user's name
... does that help?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: lost password
  2009-11-17 21:20 lost password Edward W. Rouse <erouse@comsquared.com>
  2009-11-17 21:43 ` Re: lost password Edward W. Rouse <erouse@comsquared.com>
  2009-11-17 23:56   ` Re: lost password Tom Lane <tgl@sss.pgh.pa.us>
@ 2009-11-18 15:10     ` Edward W. Rouse <erouse@comsquared.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Edward W. Rouse @ 2009-11-18 15:10 UTC (permalink / raw)
  To: pgsql-sql

Well, the username and password are the same, but the md5 is different. But
it doesn't seem to matter because either one works the same. The fact that
you can have 2 different md5's yet still have the same user name and
password and have logins work is what I found to be interesting.

But my original problem is solved in either case, so it doesn't really
matter to me. I just found it to be ... interesting.

Edward W. Rouse

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Tom Lane
Sent: Tuesday, November 17, 2009 6:57 PM
To: Edward W. Rouse
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] lost password 

"Edward W. Rouse" <erouse@comsquared.com> writes:
> After I copied the md5 over I played around a bit and found the for the
> process user. I then used the alter user sql statement and rechecked the
> md5. It was different, but I could still use the same password to log in.
> Needless to say, I am a bit confused by that, but it works and that's what
I
> need.

The md5 will depend on both the actual password and the user's name
... does that help?

			regards, tom lane

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2009-11-18 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-11-17 21:20 lost password Edward W. Rouse <erouse@comsquared.com>
2009-11-17 21:43 ` Edward W. Rouse <erouse@comsquared.com>
2009-11-17 23:56   ` Tom Lane <tgl@sss.pgh.pa.us>
2009-11-18 15:10     ` Edward W. Rouse <erouse@comsquared.com>

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