PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 17th, 2003, 11:57 PM
sfncook sfncook is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 sfncook User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old December 19th, 2003, 08:14 PM
sfncook sfncook is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 sfncook User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Postgres ignores passwords


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT