pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedentries in pg_shadow
3+ messages / 3 participants
[nested] [flat]
* entries in pg_shadow
@ 1999-08-29 00:40 Michael Richards <miker@scifair.acadiau.ca>
1999-08-29 01:00 ` Re: [HACKERS] entries in pg_shadow Tom Lane <tgl@sss.pgh.pa.us>
1999-09-01 23:23 ` Re: [SQL] entries in pg_shadow Bruce Momjian <maillist@candle.pha.pa.us>
0 siblings, 2 replies; 3+ messages in thread
From: Michael Richards @ 1999-08-29 00:40 UTC (permalink / raw)
To: pgsql-sql; hackers@postgreSQL.org
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...
Now I run off to my remote machine and try to connect...
psql -u -h test.mypostgresserverdomain.com equipment
Username: equipment
Password:
Connection to database 'equipment' failed.
Password authentication failed for user 'equipment'
Any ideas on what the heck I might be forgetting to do or not doing
properly?
I'm starting postgres up as:
su -l postgres -c 'exec /usr/local/pgsql/bin/postmaster
-D/dr/raid0/postgres/pgdata -d 1 -i -o "-E -F -S 16384 -o
/usr/local/pgsql/home/logfile" -s >> /usr/local/pgsql/home/errlog 2>&1
/usr/local/pgsql/home/errlog1 &'
In the server's errlog file I find:
Password authentication failed for user 'equipment'
It would be really nice if I'd see something like:
Sat Aug 28 21:43:39 EDT 1999 - Password authentication failed from
123.123.123.123 on database 'equipment'
-Michael
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [HACKERS] entries in pg_shadow
1999-08-29 00:40 entries in pg_shadow Michael Richards <miker@scifair.acadiau.ca>
@ 1999-08-29 01:00 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 1999-08-29 01:00 UTC (permalink / raw)
To: Michael Richards <miker@scifair.acadiau.ca>; +Cc: pgsql-sql; hackers@postgreSQL.org
Michael Richards <miker@scifair.acadiau.ca> writes:
> 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:
IIRC, the only way to set a password that actually works is ALTER USER.
The reason direct SQL hacking on pg_shadow doesn't work is that
pg_shadow isn't what the postmaster looks at (the PM itself can't do
database operations without getting into possible deadlock situations).
There's a flat text file somewhere that contains the Real Info. ALTER
USER and friends know to rewrite the flat file after updating pg_shadow.
This is documented somewhere, I think, but not nearly prominently
enough...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] entries in pg_shadow
1999-08-29 00:40 entries in pg_shadow Michael Richards <miker@scifair.acadiau.ca>
@ 1999-09-01 23:23 ` Bruce Momjian <maillist@candle.pha.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Momjian @ 1999-09-01 23:23 UTC (permalink / raw)
To: Michael Richards <miker@scifair.acadiau.ca>; +Cc: pgsql-sql; hackers@postgreSQL.org
> 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, Pennsylvania 19026
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-09-01 23:23 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-08-29 00:40 entries in pg_shadow Michael Richards <miker@scifair.acadiau.ca>
1999-08-29 01:00 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-09-01 23:23 ` Bruce Momjian <maillist@candle.pha.pa.us>
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