Re: Logging on without prompt for password - Mailing list pgsql-admin

From Scott Mead
Subject Re: Logging on without prompt for password
Date
Msg-id CAKq0gvKMHOj_u4nhgPm8HVcUMbt98ecXGF1Bft68WWuWmtEwvA@mail.gmail.com
Whole thread Raw
In response to Logging on without prompt for password  ("Rossi, Maria" <maria.rossi@jackson.com>)
List pgsql-admin
Adding back -admin

On Tue, Oct 20, 2015 at 2:44 PM, Rossi, Maria <maria.rossi@jackson.com> wrote:

Hi,

 

Back to  my original question, though.    Any ideas why it is still prompting for password even though it had ‘trust’ in the pg_hba.conf?    The .pgpass  or the PGPASSWORD is only  a work-around for that, I think.     ‘Trust’ is supposed to:

 

Allow the connection unconditionally. This method allows anyone that can connect to the PostgreSQL database server to login as any PostgreSQL user they wish, without the need for a password or any other authentication

 

So, I  shouldn’t need to set-up .pgpass or PGPASSWORD.

 

Any thoughts?


After modifying pg_hba.conf, did you reload the server?

The other thing to keep in mind is that if you are using unix sockets, you'll need a 'local db user   trust' line, and if you're using remote, you'll need a 'host / hostssl / hostnossl' line for that server.... then, reload (pg_ctl reload)

--
Scott Mead
Sr. Architect
OpenSCG
PostgreSQL, Java & Linux Experts

Desk   : (585) 483-0480
Bridge: (585) 484-8032


 

 

Thanks.

 

Maria A Rossi

Database Administration

PGDS (US)

email: maria.rossi@us.pgds.com
cell phone: 517.256.4392

work phone: 517.367.3099
work phone extension: 23099

 

From: Glauco Torres [mailto:torres.glauco@gmail.com]
Sent: Tuesday, October 20, 2015 1:54 PM
To: Rossi, Maria <maria.rossi@jackson.com>
Subject: Re: [ADMIN] Logging on without prompt for password

 

 

 

2015-10-20 15:50 GMT-02:00 Glauco Torres <torres.glauco@gmail.com>:

 

 

2015-10-20 15:44 GMT-02:00 Rossi, Maria <maria.rossi@jackson.com>:

Hi,

 

We will  try the .pgpass file at the user’s home directory, using *.* for port  as suggested by Scott Mead.    This way I don’t  have to worry about setting the  PGPASSWORD env var for the user.

 

I still need to create a role for the user, correct?  It needs admin to be able to rung pg_dumpall.

 

Thanks everyone.

 

 

 


The manual helps a lot in these types of doubts


"
Also you will need superuser privileges to execute the saved script in order to be allowed to add users and groups, and to create databases."


http://www.postgresql.org/docs/current/static/app-pg-dumpall.html

 

 

Sorry,

O copied the wrong part "Since pg_dumpall reads tables from all databases you will most likely have to connect as a database superuser in order to produce a complete dump."

 


pgsql-admin by date:

Previous
From: "Rossi, Maria"
Date:
Subject: Re: Logging on without prompt for password
Next
From: "David G. Johnston"
Date:
Subject: Fwd: Logging on without prompt for password