pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Doug Thistlethwaite <doug.t@deltanet.com>
To: Peter Mount <peter@retep.org.uk>
Cc: Doug Thistlethwaite <doug@dupreeinc.com>
Cc: Doug Thistlethwaite <doug@dupree3.dupreeinc.com>
Cc: pgsql-interface <pgsql-interfaces@postgreSQL.org>
Subject: Re: [INTERFACES] Connection from win95 to postgresql using JDBC andjdk1.2
Date: Sat, 24 Jul 1999 08:40:40 -0700
Message-ID: <3799DE78.726F30EB@deltanet.com> (raw)
References: <Pine.LNX.4.10.9907241106190.11254-100000@maidast.retep.org.uk>

Peter,

Ok, I looked and there was a table pg_user.  I notice it is in the template and
my database.  I modified it using the command (in psql)
ALTER USER doug with PASSWORD FRED;
This seems to have worked and the command returned ALTER USER.

Ok I removed the file name in the pg_hba.conf file and restarted postgres.

I get the same message when I try to connect from Java on the PC! :(

As a test, I tried this command from the linux shell

psql -u -h localhost doug

Username: doug
password: fred

Everything seems to work fine.

I also tried the same command with a bogus password and it also worked! so the
above statement must not be checking passwords or something.

I am totally lost on what to do.

Doug


Peter Mount wrote:

> 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@retep.org.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




view thread (5+ messages)

Message-ID: <3799DE78.726F30EB@deltanet.com>
Permalink:  ../3799DE78.726F30EB@deltanet.com/
Also on:    postgresql.org/message-id/3799DE78.726F30EB@deltanet.com

 · 

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-interfaces@postgresql.org
  Cc: doug.t@deltanet.com, peter@retep.org.uk, doug@dupreeinc.com, doug@dupree3.dupreeinc.com
  Subject: Re: [INTERFACES] Connection from win95 to postgresql using JDBC andjdk1.2
  In-Reply-To: <3799DE78.726F30EB@deltanet.com>

* 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