Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Connection from win95 to postgresql using JDBC andjdk1.2

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: Doug Thistlethwaite <doug(at)dupreeinc(dot)com>
Cc: Doug Thistlethwaite <doug(at)dupree3(dot)dupreeinc(dot)com>, pgsql-interface <pgsql-interfaces(at)postgresql(dot)org>, doug(dot)t(at)deltanet(dot)com
Subject: Re: [INTERFACES] Connection from win95 to postgresql using JDBC andjdk1.2
Date: 1999-07-24 10:10:49
Message-ID: Pine.LNX.4.10.9907241106190.11254-100000@maidast.retep.org.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces
On Fri, 23 Jul 1999, Doug Thistlethwaite wrote:

> Peter,
> 
> Glad you have your system back up and running! :)
> 
> I have already tried this and I received the same results as I did
> without the line (Auth failure).
> 
> Your previous message stated that:
> 
> > I'm now used to the more recent backends, which use the "ALTER USER" sql
> > statement, and the passwords are now stored in a hidden system table,
> > which is why my examples above don't have a file name in them.
> >
> 
> How do I load my original passwords into this hidden system file?  I
> added the password for doug using the following command:
> 
> pg_passwd /var/postgres/passwd
> 
> <Enter User Name> Doug
> <Enter User Password> db
> 
> I did not see anything in the docs about setting passwords into the
> system table.  Is there a different way to enter passwords now for
> postgres access?

Yes.

There's a hidden table called pg_shadow which contains the user names and
passwords, and a view called pg_user which lists the same thing (with *
replacing the password entries).

The ALTER USER statement updates pg_shadow, which then updates a flatfile
in the PGDATA directory (someone correct me if I'm wrong here, I'm pulling
this from memory), which is then used by the postmaster when the
connections are made.

This flat file is why ALTER USER should be used, not an UPDATE statement
on the pg_shadow table.

Peter

--
       Peter T Mount peter(at)retep(dot)org(dot)uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


In response to

Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 1999-07-24 15:27:16
Subject: Re: [INTERFACES] More VB
Previous:From: Byron NikolaidisDate: 1999-07-24 02:58:24
Subject: Re: [INTERFACES] S1C00: Only SQL_POSITION/REFRESH is supported for SQLSetPos

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group