Thread: BUG #4450: Postgres do not ask for passord
The following bug has been logged online: Bug reference: 4450 Logged by: Carlos Email address: cadup@ig.com.br PostgreSQL version: 8.2 Operating system: linux Description: Postgres do not ask for passord Details: I have one user that is a superuser. The pg_hba.conf is set to use md5 specific to this user. When I connect the postgresql do not ask for the password. If I change the pg_hba.con to reject, it works. Do you know what is the problem?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Oct 05, 2008 at 02:42:31PM +0000, Carlos wrote: > > The following bug has been logged online: > > Bug reference: 4450 > Logged by: Carlos > Email address: cadup@ig.com.br > PostgreSQL version: 8.2 > Operating system: linux > Description: Postgres do not ask for passord > Details: > > I have one user that is a superuser. The pg_hba.conf is set to use md5 > specific to this user. When I connect the postgresql do not ask for the > password. If I change the pg_hba.con to reject, it works. Do you know what > is the problem? Maybe you still have an entry like local all all trust somewhere in pg_hba.conf? Regards - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFI6O0kBcgs9XrR2kYRAnYHAJ40uG8aDUGazJInKvscyuIlgDDEDACfcr1Q SFXPA0Q4JW8Y04HRsstiYOc= =lIC2 -----END PGP SIGNATURE-----
On Sun, Oct 5, 2008 at 10:06 PM, <tomas@tuxteam.de> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sun, Oct 05, 2008 at 02:42:31PM +0000, Carlos wrote: > > > > The following bug has been logged online: > > > > Bug reference: 4450 > > Logged by: Carlos > > Email address: cadup@ig.com.br > > PostgreSQL version: 8.2 > > Operating system: linux > > Description: Postgres do not ask for passord > > Details: > > > > I have one user that is a superuser. The pg_hba.conf is set to use md5 > > specific to this user. When I connect the postgresql do not ask for the > > password. If I change the pg_hba.con to reject, it works. Do you know > what > > is the problem? > > Maybe you still have an entry like > > local all all trust > > somewhere in pg_hba.conf? Posting both your versions of pg_hba.conf would help. (Strip out the commented lines). Best regards, -- gurjeet[.singh]@EnterpriseDB.com singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com EnterpriseDB http://www.enterprisedb.com Mail sent from my BlackLaptop device
This is my pg_hba.conf: # TYPE DATABASE USER CIDR-ADDRESS METHOD host all postgres 0.0.0.0/0 reject local bancoX userX trust local all all md5 host all all 127.0.0.1/32 md5 host all userY 0.0.0.0/0 md5 host bancoX all 0.0.0.0/0 md5 host all all 0.0.0.0/0 reject If I try a remote Access using psql or pgadmin and the user is userY it Access and do not ask for password. If I use other user it ask for password. If I change the pg_hba.conf to # TYPE DATABASE USER CIDR-ADDRESS METHOD host all postgres 0.0.0.0/0 reject local bancoX userX trust local all all md5 host all all 127.0.0.1/32 md5 host all userY 0.0.0.0/0 reject host bancoX all 0.0.0.0/0 md5 host all all 0.0.0.0/0 reject It reject correctly my Access. I realy think this is a bug. I tryed drop and recreate the user and continue the same. Tanks for help, Carlos De: Gurjeet Singh [mailto:singh.gurjeet@gmail.com] Enviada em: domingo, 5 de outubro de 2008 19:59 Para: tomas@tuxteam.de Cc: Carlos; pgsql-bugs@postgresql.org Assunto: Re: [BUGS] BUG #4450: Postgres do not ask for passord On Sun, Oct 5, 2008 at 10:06 PM, <tomas@tuxteam.de> wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Oct 05, 2008 at 02:42:31PM +0000, Carlos wrote: > > The following bug has been logged online: > > Bug reference: 4450 > Logged by: Carlos > Email address: cadup@ig.com.br > PostgreSQL version: 8.2 > Operating system: linux > Description: Postgres do not ask for passord > Details: > > I have one user that is a superuser. The pg_hba.conf is set to use md5 > specific to this user. When I connect the postgresql do not ask for the > password. If I change the pg_hba.con to reject, it works. Do you know what > is the problem? Maybe you still have an entry like local all all trust somewhere in pg_hba.conf? Posting both your versions of pg_hba.conf would help. (Strip out the commented lines). Best regards, -- gurjeet[.singh]@EnterpriseDB.com singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com EnterpriseDB http://www.enterprisedb.com Mail sent from my BlackLaptop device
"Cadu" <cadup@ig.com.br> writes: > If I try a remote Access using psql or pgadmin and the user is userY it > Access and do not ask for password. > If I use other user it ask for password. Hmm, there's nothing in your pg_hba.conf to explain that. I think maybe you have a ~/.pgpass file (I forget how it's spelled on Windows) that is silently supplying userY's password on the client side. regards, tom lane