Re: [SQL] entries in pg_shadow - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: [SQL] entries in pg_shadow
Date
Msg-id 199909012323.TAA25916@candle.pha.pa.us
Whole thread Raw
In response to entries in pg_shadow  (Michael Richards <miker@scifair.acadiau.ca>)
List pgsql-sql
> Hi.
> 
> The entries entered in pg_shadow haven't ever worked for me. I've tried a
> number of times without success. If I update a user in there and set a
> password for them:
> postgres=> select * from pg_shadow;
> usename  |usesysid|usecreatedb|usetrace|usesuper|usecatupd|passwd|valuntil                    
> ---------+--------+-----------+--------+--------+---------+-------+----------------------------
> postgres |     100|t          |t       |t       |t        |       |Sat Jan31 01:00:00 2037 EST
> user1    |    1001|f          |t       |f       |t        |       |                            
> equipment|    1004|f          |t       |f       |t        | MYPASS|                            
> (3 rows)
> 
> This example assumes I've set my password to 'MYPASS'.
> Now I change pg_hba.conf to have a:
> host         equipment   123.123.123.123  255.255.0.0     password 
> 
> Assuming my IP is 123.123.123.123 and the database I need to connect to is
> called equipment and the user is of course equipment...
> 
> I've restarted the server and...

You may need to restart the postmaster, or do a dummy change to a user. 
There is a flat file that contains the pg_shadow contents that gets
updated with normal USER commands, but SQL commands don't update it.  It
is on our TODO list.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [SQL] Newbie dbadmin out of his league
Next
From: Martin Neumann
Date:
Subject: How to resume an aborted transaction