|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Postgres ignores passwords
I need to enable passwords for my database. I have set pg_hba.conf:
host links 0.0.0.0 0.0.0.0 password passwords When I connect it will reject requests if the userid is not valid but doesn't give a poop about the password. What am I doing wrong? Also, it even allows UNIX userid's to connect (also without a correct password). This is really confusing since the docs explcitely state the UNIX userid's are seperate from the database userID's. I don't really care which set of ID's it lets connect as long as the password is validated. What's going on? Thanks folks. |
|
#2
|
|||
|
|||
|
solution
This post is a public service announcment for anyone else who can't figure this problem out. Here's the deal:
I had to use the pg_ctl executable to reload the PostgreSQL server. Try reading man pg_ctl for some info. I first ran it like this: pg_ctl reload (where 'reload' is the parameter passed in to tell the application to 'reload' the server's options (ie: the pg_hba.conf file)) When I ran this I got "pg_ctl: no database directory or environment variable $PGDATA is specified" Not knowing what PGDATA is but knowing where my pg_hba.conf file was I changed to that directory (mine is /var/lib/pgsql/data) and ran the command there with the other parameter: pg_ctl reload -D . Viola!!! It works! Now I can only connect to my database with a valid PostgreSQL userid (no unix ids allowed) and it validates the password too!!! Is that cool, or what? I love solving problems! |
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > Postgres ignores passwords |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|