Re: [GENERAL] probable pg_hba.conf configuration issues
Ravi Roy ravi.a...@gmail.com writes: Using command line : psql -U superuser1 psql -U normaluser1 asks for password and login successfully. - perfect. (We are only alloing local connections, remote connections to database are disabled) But if I try to connect using pgadmin (from the same machine) it gives acess to database without password, i'm surprised as it does not seem to respect pg_hba.conf or i'm terribly wrong in the configuration somewhere. pgadmin is no doubt caching the password somewhere. I think it uses ~/.pgpass, though psql would too, so maybe there's something pgadmin-specific involved. regards, tom lane -- 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] probable pg_hba.conf configuration issues
My bet is you have either another line in the pg_hba that says trust or you saved the password and forgot. Sim On 05/07/2014 05:33 PM, Ravi Roy wrote: Hi, I'm sorry if this question have been asked earlier, but i could not find any valid result through googling. I'm running postgresql 9.1 on Windows 7 (64 bit) and i've following configuration in pg_hba.conf. host all superuser1 127.0.0.1/32 password host all normaluser1 127.0.0.1/32 password Using command line : psql -U superuser1 psql -U normaluser1 asks for password and login successfully. - perfect. (We are only alloing local connections, remote connections to database are disabled) But if I try to connect using pgadmin (from the same machine) it gives acess to database without password, i'm surprised as it does not seem to respect pg_hba.conf or i'm terribly wrong in the configuration somewhere. Does somebody have any idea what is wrong? Thank you Ravi.
Re: [GENERAL] probable pg_hba.conf configuration issues
Ravi Roy wrote But if I try to connect using pgadmin (from the same machine) it gives acess to database without password, i'm surprised as it does not seem to respect pg_hba.conf or i'm terribly wrong in the configuration somewhere. You likely told pgadmin to remember (store) passwords. If you select “Store password”, pgAdmin stores passwords you enter in the ~/.pgpass file under Unix or :file:%APPDATA%postgresqlpgpass.conf under Win32 for later reuse. For details, see pgpass documentation. It will be used for all libpq based tools. If you want the password removed, you can select the server’s properties and uncheck the selection any time. http://www.pgadmin.org/docs/1.18/connect.html -- View this message in context: http://postgresql.1045698.n5.nabble.com/probable-pg-hba-conf-configuration-issues-tp5802949p5802954.html Sent from the PostgreSQL - general mailing list archive at Nabble.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] probable pg_hba.conf configuration issues
Thanks Sim, Tom David, i'm really amazed with quick answers and insight provided by you all. I found and was a password cache issue under %APPDATA%\postgresql\pgpass.conf; I removed it and everything works as expected. Thank you again guys! Regards, Ravi. On Wed, May 7, 2014 at 8:22 PM, David G Johnston david.g.johns...@gmail.com wrote: Ravi Roy wrote But if I try to connect using pgadmin (from the same machine) it gives acess to database without password, i'm surprised as it does not seem to respect pg_hba.conf or i'm terribly wrong in the configuration somewhere. You likely told pgadmin to remember (store) passwords. If you select “Store password”, pgAdmin stores passwords you enter in the ~/.pgpass file under Unix or :file:%APPDATA%postgresqlpgpass.conf under Win32 for later reuse. For details, see pgpass documentation. It will be used for all libpq based tools. If you want the password removed, you can select the server’s properties and uncheck the selection any time. http://www.pgadmin.org/docs/1.18/connect.html -- View this message in context: http://postgresql.1045698.n5.nabble.com/probable-pg-hba-conf-configuration-issues-tp5802949p5802954.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general