Re: [ADMIN] "pg_guest" is not in "pg_shadow" error. - Mailing list pgsql-admin

From Peter Mount
Subject Re: [ADMIN] "pg_guest" is not in "pg_shadow" error.
Date
Msg-id Pine.LNX.3.95.980530123123.11571A-100000@retep.org.uk
Whole thread Raw
In response to Re: [ADMIN] "pg_guest" is not in "pg_shadow" error.  ("Sejin Oh" <soh@cyberix.com>)
List pgsql-admin
On Thu, 28 May 1998, Sejin Oh wrote:

> Hello..
>
> I didn't make user called pg_guest with createuser, I user pg_passwd to
> create pg_guest and tried to connect postgreSQL with postgres userid.

Yes, that is because the postgres userid is not in the passwd file.
Because you have configured pg_hba.conf to use a password file, rather
than passwords using the pg_shadow table, any existing users must be in
that file.

Anyhow, since 6.3, the pg_shadow table stores the password, and the
authentication code takes this into account. Only DBA's can access it
(normal users can only use the pg_user view, which shows * for the
password).

In pg_hba.conf, your line becomes:

local    all password
host         all         127.0.0.1     255.255.255.255   password

Then, using the "create user" and "alter user" SQL commands as the
postgres user, you can set & change the passwords.

tip: For password (or crypt) authentication to work for a user, it must
have a password, including the postgres DBA. Set the local line to trust,
connect, then set an initial password. Once done, change the local line to
password.

Another tip: crypt is not really of use for local, or the loopback
connections. Here's my pg_hba.conf file:

local        all                                         password
host         all         127.0.0.1     255.255.255.255   password
host         all         192.168.1.0     255.255.255.0   crypt
host         all         158.152.22.37 255.255.255.255 crypt

Here, I use crypt for any connection going over a cable, password when it
says internal to the machine.


> -----Original Message-----
> From: Peter Mount <pgsqladmin@retep.org.uk>
> To: Sejin Oh <soh@cyberix.com>
> Cc: pgsql-admin@postgreSQL.org <pgsql-admin@postgreSQL.org>
> Date: Wednesday, May 27, 1998 2:35 PM
> Subject: Re: [ADMIN] "pg_guest" is not in "pg_shadow" error.
>
>
> >On Wed, 27 May 1998, Sejin Oh wrote:
> >
> >> In my pg_hda.conf:
> >> local        all
> >> password passwd
> >> host         all         127.0.0.1     255.255.255.255   password passwd
> >>
> >> then made password file using pg_passwd utility and made pg_guest user:
> >>
> >> [postgres@turbo data]$ pg_passwd passwd
> >> Username: pg_guest
> >> New password:
> >> Re-enter new password:
> >>
> >> [postgres@turbo data]$ more passwd
> >> pg_guest:BNCVMQvaZsLXs
> >>
> >> then when i try to connect to database I get this error message:
> >>
> >> [postgres@turbo data]$ psql -u temple
> >> Username: pg_guest
> >> Password:
> >>
> >> Connection to database 'temple' failed.
> >> FATAL 1:  SetUserId: user "pg_guest" is not in "pg_shadow"
> >>
> >> Can anyone help me what is the solution for this FATAL 1:  SetUserId:
> user
> >> "pg_guest" is not in "pg_shadow" error?
> >
> >Did you create the user using createuser? (other than creating the entry
> >in your passwd file)
> >
> >--
> >Peter T Mount peter@retep.org.uk or petermount@earthling.net
> >Main Homepage: http://www.retep.org.uk
> >************ Someday I may rebuild this signature completely ;-)
> ************
> >Work Homepage: http://www.maidstone.gov.uk Work EMail:
> peter@maidstone.gov.uk
> >
> >
>
>

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


pgsql-admin by date:

Previous
From: Leon Harris
Date:
Subject: Postgres installation killing me
Next
From: Thomas Lester
Date:
Subject: ODBC Call fail?