pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
psql security fail?
8+ messages / 5 participants
[nested] [flat]

* psql security fail?
@ 2013-11-03 20:20  Maxy <maxy0440yxam@yahoo.it>
  0 siblings, 2 replies; 8+ messages in thread

From: Maxy @ 2013-11-03 20:20 UTC (permalink / raw)
  To: pgsql-bugs

Good morning, i have a pg_hba.conf 

local   all             all                                     md5
host    all             all             127.0.0.1/32            md5


if i do a 


psql -d mydb

pg asks me the password but if i do

psql -U postgresql -d mydb

pg don't ask me the password.
PostgreSQL 9.2.4 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.7.1, 32-bit

i did some tries, and the same configuration and the same source 
compiled on slackware arm 14.0 on a raspberry works without the bug.



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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: psql security fail?
@ 2013-11-03 20:41  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Maxy <maxy0440yxam@yahoo.it>
  1 sibling, 0 replies; 8+ messages in thread

From: Tom Lane @ 2013-11-03 20:41 UTC (permalink / raw)
  To: Maxy <maxy0440yxam@yahoo.it>; +Cc: pgsql-bugs

Maxy <maxy0440yxam@yahoo.it> writes:
> Good morning, i have a pg_hba.conf 
> local   all             all                                     md5
> host    all             all             127.0.0.1/32            md5

> if i do a 

> psql -d mydb

> pg asks me the password but if i do

> psql -U postgresql -d mydb

> pg don't ask me the password.

Sounds to me like Postgres isn't actually using the pg_hba.conf file you
think it is.  Try "show hba_file;" while connected to see which file
is really being used.  Also, if you changed the file's contents, you might
have forgotten to restart or SIGHUP the postmaster to get it to notice
the change.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: psql security fail?
@ 2013-11-05 20:10  John R Pierce <pierce@hogranch.com>
  parent: Maxy <maxy0440yxam@yahoo.it>
  1 sibling, 2 replies; 8+ messages in thread

From: John R Pierce @ 2013-11-05 20:10 UTC (permalink / raw)
  To: pgsql-bugs

On 11/3/2013 12:20 PM, Maxy wrote:
> psql -d mydb
>
> pg asks me the password but if i do
>
> psql -U postgresql -d mydb
>
> pg don't ask me the password.
> PostgreSQL 9.2.4 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.7.1, 32-bit


$ psql -U postgresql -d mydb
psql: FATAL:  role "postgresql" does not exist

  PostgreSQL 9.2.4 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 
20080704 (Red Hat 4.1.2-54), 32-bit


something is whack.


-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast



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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: psql security fail?
@ 2013-11-05 20:15  Magnus Hagander <magnus@hagander.net>
  parent: John R Pierce <pierce@hogranch.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Magnus Hagander @ 2013-11-05 20:15 UTC (permalink / raw)
  To: John R Pierce <pierce@hogranch.com>; +Cc: pgsql-bugs

On Tue, Nov 5, 2013 at 9:10 PM, John R Pierce <pierce@hogranch.com> wrote:
> On 11/3/2013 12:20 PM, Maxy wrote:
>>
>> psql -d mydb
>>
>> pg asks me the password but if i do
>>
>> psql -U postgresql -d mydb
>>
>> pg don't ask me the password.
>> PostgreSQL 9.2.4 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.7.1, 32-bit
>
>
>
> $ psql -U postgresql -d mydb
> psql: FATAL:  role "postgresql" does not exist
>
>  PostgreSQL 9.2.4 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704
> (Red Hat 4.1.2-54), 32-bit
>
>
> something is whack.

I would check if there's by any chance a .pgpass file in your home
directory, which contains the password used to log in.


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: psql security fail?
@ 2013-11-05 20:19  Maxy <maxy0440yxam@yahoo.it>
  parent: John R Pierce <pierce@hogranch.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Maxy @ 2013-11-05 20:19 UTC (permalink / raw)
  To: pgsql-bugs



>something is whack.

it's postgres. but i did right in my pc.



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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: psql security fail?
@ 2013-11-05 20:23  Maxy <maxy0440yxam@yahoo.it>
  parent: Magnus Hagander <magnus@hagander.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Maxy @ 2013-11-05 20:23 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; +Cc: pgsql-bugs



>I would check if there's by any chance a .pgpass file in your home
directory, which contains the password used to log in.

it worked! i don't know how it is appeared that file, but i will read the manual.

thank you very much!!!!!!


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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: psql security fail?
@ 2013-11-05 20:30  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Maxy <maxy0440yxam@yahoo.it>
  0 siblings, 1 reply; 8+ messages in thread

From: Alvaro Herrera @ 2013-11-05 20:30 UTC (permalink / raw)
  To: Maxy <maxy0440yxam@yahoo.it>; +Cc: Magnus Hagander <magnus@hagander.net>; pgsql-bugs

Maxy wrote:

> >I would check if there's by any chance a .pgpass file in your home
> >directory, which contains the password used to log in.
> 
> it worked! i don't know how it is appeared that file, but i will read the manual.

IIRC pgadmin creates it automatically?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: psql security fail?
@ 2013-11-05 21:00  Maxy <maxy0440yxam@yahoo.it>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Maxy @ 2013-11-05 21:00 UTC (permalink / raw)
  To: ; +Cc: pgsql-bugs

>IIRC pgadmin creates it automatically?


i think it is possible.



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



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2013-11-05 21:00 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-11-03 20:20 psql security fail? Maxy <maxy0440yxam@yahoo.it>
2013-11-03 20:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-11-05 20:10 ` John R Pierce <pierce@hogranch.com>
2013-11-05 20:15   ` Magnus Hagander <magnus@hagander.net>
2013-11-05 20:23     ` Maxy <maxy0440yxam@yahoo.it>
2013-11-05 20:30       ` Alvaro Herrera <alvherre@2ndquadrant.com>
2013-11-05 21:00         ` Maxy <maxy0440yxam@yahoo.it>
2013-11-05 20:19   ` Maxy <maxy0440yxam@yahoo.it>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox