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

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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 May 5th, 2012, 09:31 AM
mojtaba.baghban mojtaba.baghban is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 4 mojtaba.baghban User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 36 sec
Reputation Power: 0
Psql does not prompt password requset [Solved]

Hi everybody
First excuse me for my poor English.
My problem is that when I run command
mojtaba@MOJTABA-PC:~$ psql -U postgres
in terminal it does not request for password and log in with all privilege and print:
psql (9.1.3)
Type "help" for help.

postgres=#

while pg_hba.conf file is:
local all postgres md5


local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5

what is the problem?
thanks in advance

Reply With Quote
  #2  
Old May 7th, 2012, 08:03 AM
mojtaba.baghban mojtaba.baghban is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 4 mojtaba.baghban User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 36 sec
Reputation Power: 0
Please help me.

Reply With Quote
  #3  
Old May 8th, 2012, 03:20 PM
joeflinthiggins joeflinthiggins is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 14 joeflinthiggins User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 20 m 33 sec
Reputation Power: 0
Hi,

It sounds like you have not yet set a password for the postgres user.

Once you're at the postgres=# prompt, enter this:

ALTER USER Postgres WITH PASSWORD '<newpassword>';

Replace the <newpassword> with whatever you want your password to be.

After that, the postgres user should requite authentication.

Joe

Reply With Quote
  #4  
Old May 9th, 2012, 09:54 AM
mojtaba.baghban mojtaba.baghban is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 4 mojtaba.baghban User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 36 sec
Reputation Power: 0
thanks for your reply
but I d have set password for postgres and when I use -W option it request password for user postgres. I have confused. Please help me

Reply With Quote
  #5  
Old May 9th, 2012, 11:26 AM
shammat shammat is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Oct 2003
Location: Germany
Posts: 2,685 shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Month 3 Weeks 3 Days 19 h 53 m 20 sec
Reputation Power: 284
Check if you have an environment PGPASS defined.
Details on that are here: http://www.postgresql.org/docs/current/static/libpq-envars.html

Check if you have a pgpass file
Details on that are here: http://www.postgresql.org/docs/current/static/libpq-pgpass.html

Reply With Quote
  #6  
Old May 11th, 2012, 06:20 AM
mojtaba.baghban mojtaba.baghban is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 4 mojtaba.baghban User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 36 sec
Reputation Power: 0
Thank you very much
I remove password from .pgpass file and problem fixed.

unfortunately my english is week to properly acknowledge you.
thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Psql does not prompt password requset

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap