Re: Logging on without prompt for password

From: Scott Mead <scottm(at)openscg(dot)com>
To: "Rossi, Maria" <maria(dot)rossi(at)jackson(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Cc: Glauco Torres <torres(dot)glauco(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Subject: Re: Logging on without prompt for password
Date: 2015-10-20 18:52:24
Message-ID: CAKq0gvKMHOj_u4nhgPm8HVcUMbt98ecXGF1Bft68WWuWmtEwvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Adding back -admin

On Tue, Oct 20, 2015 at 2:44 PM, Rossi, Maria <maria(dot)rossi(at)jackson(dot)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 <5854830480>
Bridge: (585) 484-8032 <5854848032>

http://openscg.com

>
>
> Thanks.
>
>
>
> *Maria A Rossi*
>
> Database Administration
>
> PGDS (US)
>
> email: maria(dot)rossi(at)us(dot)pgds(dot)com
> cell phone: 517.256.4392
>
> work phone: 517.367.3099
> work phone extension: 23099
>
>
>
> *From:* Glauco Torres [mailto:torres(dot)glauco(at)gmail(dot)com]
> *Sent:* Tuesday, October 20, 2015 1:54 PM
> *To:* Rossi, Maria <maria(dot)rossi(at)jackson(dot)com>
> *Subject:* Re: [ADMIN] Logging on without prompt for password
>
>
>
>
>
>
>
> 2015-10-20 15:50 GMT-02:00 Glauco Torres <torres(dot)glauco(at)gmail(dot)com>:
>
>
>
>
>
> 2015-10-20 15:44 GMT-02:00 Rossi, Maria <maria(dot)rossi(at)jackson(dot)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."
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2015-10-20 19:37:16 Fwd: Logging on without prompt for password
Previous Message Rossi, Maria 2015-10-20 17:44:21 Re: Logging on without prompt for password