Re: [GENERAL] Postgresql allow connections without password

2012-01-13 Thread Raymond O'Donnell
On 12/01/2012 05:16, debian nick wrote:
 I have postgresql 8.4.9 installed now, my problem is that from time to
 time my postgresql let psql version 8.4.9 access the database without
 asking for password (psql -d mydatabase -h myhost -U myuser), and the
 connection attempts from psql 8.3 are not allowed no matter what i got
 time out exceptions from psql 8.3.
 The first time that happen to my i have installed postgresql 8.3, so i
 think that because i upgrade my system and not postgres (i upgrade from
 debian lenny (5) to squeeze (6)) that was the problem, so i installed
 8.4.9 and with pg_dumpall i restore all my databases. And the problem
 was solved. Postgresql ask for passwords no matter from where i try to
 connect.
 And now a month later i have the same problem with 8.4.9. After various
 restart, stop and start the problem disappear, and 3 hours later it came
 back.

Do you have pgAdmin on the same (client) machine? pgAdmin stores
passwords in the .pgpass file (though it asks you first, and also warns
about clear-text password) which could possibly explain this
intermittent behaviour.

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
r...@iol.ie

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql allow connections without password [SOLVED]

2012-01-13 Thread debian nick
Thanks raymond, you were right, i never think that psql was using .pgpass
file. When a delete it psql ask me for the password.
THANKS I’ll never figure that out.

2012/1/13 Raymond O'Donnell r...@iol.ie

 On 12/01/2012 05:16, debian nick wrote:
  I have postgresql 8.4.9 installed now, my problem is that from time to
  time my postgresql let psql version 8.4.9 access the database without
  asking for password (psql -d mydatabase -h myhost -U myuser), and the
  connection attempts from psql 8.3 are not allowed no matter what i got
  time out exceptions from psql 8.3.
  The first time that happen to my i have installed postgresql 8.3, so i
  think that because i upgrade my system and not postgres (i upgrade from
  debian lenny (5) to squeeze (6)) that was the problem, so i installed
  8.4.9 and with pg_dumpall i restore all my databases. And the problem
  was solved. Postgresql ask for passwords no matter from where i try to
  connect.
  And now a month later i have the same problem with 8.4.9. After various
  restart, stop and start the problem disappear, and 3 hours later it came
  back.

 Do you have pgAdmin on the same (client) machine? pgAdmin stores
 passwords in the .pgpass file (though it asks you first, and also warns
 about clear-text password) which could possibly explain this
 intermittent behaviour.

 Ray.


 --
 Raymond O'Donnell :: Galway :: Ireland
 r...@iol.ie



Re: [GENERAL] Postgresql allow connections without password [SOLVED]

2012-01-13 Thread Adrian Klaver

On 01/13/2012 09:10 AM, debian nick wrote:

Thanks raymond, you were right, i never think that psql was using
.pgpass file. When a delete it psql ask me for the password.
THANKS I’ll never figure that out.


You still should check your pg_hba.conf file for trust and ident 
connection rules. .pgpass only comes into play when the connection calls 
for password authentication. If the pg_hba file has rules that allow 
connections without passwords they will occur with or without the 
presence of a .pgpass file.






--
Adrian Klaver
adrian.kla...@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Postgresql allow connections without password

2012-01-12 Thread debian nick
I have postgresql 8.4.9 installed now, my problem is that from time to time
my postgresql let psql version 8.4.9 access the database without asking for
password (psql -d mydatabase -h myhost -U myuser), and the connection
attempts from psql 8.3 are not allowed no matter what i got time out
exceptions from psql 8.3.
The first time that happen to my i have installed postgresql 8.3, so i
think that because i upgrade my system and not postgres (i upgrade from
debian lenny (5) to squeeze (6)) that was the problem, so i installed 8.4.9
and with pg_dumpall i restore all my databases. And the problem was solved.
Postgresql ask for passwords no matter from where i try to connect.
And now a month later i have the same problem with 8.4.9. After various
restart, stop and start the problem disappear, and 3 hours later it came
back.
I don't know what to do.
In my logs the only strange thing i startup package incomplete after i
start the server. I google it but nothing seems to explain it, and i don't
have any cron.

Now im going to install postgresql 9 to see if the problem disappear.

Any help will be really appreciate.


Re: [GENERAL] Postgresql allow connections without password

2012-01-12 Thread Adrian Klaver
On Wednesday, January 11, 2012 9:16:04 pm debian nick wrote:
 I have postgresql 8.4.9 installed now, my problem is that from time to time
 my postgresql let psql version 8.4.9 access the database without asking for
 password (psql -d mydatabase -h myhost -U myuser), and the connection
 attempts from psql 8.3 are not allowed no matter what i got time out
 exceptions from psql 8.3.
 The first time that happen to my i have installed postgresql 8.3, so i
 think that because i upgrade my system and not postgres (i upgrade from
 debian lenny (5) to squeeze (6)) that was the problem, so i installed 8.4.9
 and with pg_dumpall i restore all my databases. And the problem was solved.
 Postgresql ask for passwords no matter from where i try to connect.
 And now a month later i have the same problem with 8.4.9. After various
 restart, stop and start the problem disappear, and 3 hours later it came
 back.
 I don't know what to do.
 In my logs the only strange thing i startup package incomplete after i
 start the server. I google it but nothing seems to explain it, and i don't
 have any cron.
 
 Now im going to install postgresql 9 to see if the problem disappear.

Well before you do that, take a look at your pg_hba.conf file. See if you have 
any lines where the METHOD is 'trust'.  This allows a client to connect to 
Postgres without a password. My guess is you have some connections that are 
matching a 'trust' rule.

 
 Any help will be really appreciate.

-- 
Adrian Klaver
adrian.kla...@gmail.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Postgresql allow connections without password

2012-01-12 Thread Alan Hodgson
On Thursday, January 12, 2012 02:16:04 AM debian nick wrote:
 Any help will be really appreciate.

Check your pg_hba.conf file for any entries with trust or ident. Remove 
them and restart the server.

Also look for .pgpass files in the home directories of any user seeing this.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general