pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
can't authenticate pg admin
3+ messages / 2 participants
[nested] [flat]

* can't authenticate pg admin
@ 2004-08-11 10:17 Martin J. Brown, Jr. <mjbjr@mjbjr.com>
  2004-08-13 18:54 ` Re: can't authenticate pg admin Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Martin J. Brown, Jr. @ 2004-08-11 10:17 UTC (permalink / raw)
  To: pgsql-admin

I've had this problem with 7.3.3, and now with 7.4.3. ...

The pg admin is the default 'postgres'.  As 'postgres', I do...

postgres@localhost postgres $ 'psql -d template1'
Welcome to psql 7.4.3, the PostgreSQL interactive terminal.

template1=# alter user postgres password 'xyz'
template1=#

I exit 'psql'.

I then edit 'pg_hba.conf', changing from 'trust' to 'password'.
I stop, then start pg.

I then do 'psql -d template1', which results in a password prompt.
I enter 'xyz', and get an authentication error for user "postgres".

Other db users authenticate fine, only the admin fails.

Any ideas on how to fix this?

-- 
                            - Martin J. Brown, Jr. -
                              - mjbjr@mjbjr.com -
Public PGP Key ID: 0x76A1778E keyserver: http://pgpkeys.mit.edu:11371/
Fingerprint: F2D2 5D2B 333F 79D0 D126  0941 21D6 7321 76A1 778E




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

* Re: can't authenticate pg admin
  2004-08-11 10:17 can't authenticate pg admin Martin J. Brown, Jr. <mjbjr@mjbjr.com>
@ 2004-08-13 18:54 ` Tom Lane <tgl@sss.pgh.pa.us>
  2004-08-16 07:30   ` Re: can't authenticate pg admin Martin J. Brown, Jr. <mjbjr@mjbjr.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2004-08-13 18:54 UTC (permalink / raw)
  To: Martin J. Brown, Jr. <mjbjr@mjbjr.com>; +Cc: pgsql-admin

"Martin J. Brown, Jr." <mjbjr@mjbjr.com> writes:
> Other db users authenticate fine, only the admin fails.

That seems very odd.  The only theory that comes to mind is that you've
set a password expiration time for that account in pg_shadow.

			regards, tom lane



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

* Re: can't authenticate pg admin
  2004-08-11 10:17 can't authenticate pg admin Martin J. Brown, Jr. <mjbjr@mjbjr.com>
  2004-08-13 18:54 ` Re: can't authenticate pg admin Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-08-16 07:30   ` Martin J. Brown, Jr. <mjbjr@mjbjr.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Martin J. Brown, Jr. @ 2004-08-16 07:30 UTC (permalink / raw)
  To: pgsql-admin

On Fri, 13 Aug 2004 14:54:36 -0400, Tom Lane wrote:

> "Martin J. Brown, Jr." <mjbjr@mjbjr.com> writes:
>> Other db users authenticate fine, only the admin fails.
> 
> That seems very odd.  The only theory that comes to mind is that you've
> set a password expiration time for that account in pg_shadow.
> 

After double checking...

Yes, the pg admin, "postgres", fails authentication, and regular db users
don't even get asked to authenticate!!

'pg_hba.conf' shows:

local   all         all                                             password
 
# IPv4-style local connections:
host    all         all         127.0.0.1         255.255.255.255   password
 
# IPv6-style local connections:
host    all         all         ::1              
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff        password


As for 'pg_shadow', never touched it.

In the process of trying to hunt down this problem, I've set "postgres"'s
pw numerous times.  And the time from that to testing would've been less
than 30 seconds.  A very short expiration, indeed.

Is there a way to check that the pw has actually been set (to anything)?
When I use 'alter user postgres with password 'abc'' within 'psql'and hit
enter, I get a new psql prompt, but no indication of whether the command
succeeded or failed.  Is that normal?



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


end of thread, other threads:[~2004-08-16 07:30 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-11 10:17 can't authenticate pg admin Martin J. Brown, Jr. <mjbjr@mjbjr.com>
2004-08-13 18:54 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-08-16 07:30   ` Martin J. Brown, Jr. <mjbjr@mjbjr.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