From: | Luca Ferrari <fluca1978(at)infinito(dot)it> |
---|---|
To: | "Birchall, Austen" <austen(dot)birchall(at)metoffice(dot)gov(dot)uk> |
Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Running psql commands from a remote location & pg_hba.conf? |
Date: | 2013-08-06 06:11:31 |
Message-ID: | CAKoxK+4Hr0A8peSS=cvKwDidcUqFWdELh3TDudWW0HHB8hCpWQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Mon, Aug 5, 2013 at 5:46 PM, Birchall, Austen
<austen(dot)birchall(at)metoffice(dot)gov(dot)uk> wrote:
> And thanks once again for your assistance. Yes a role would work although I would have to remember to add any new users to it as they are created.
Similar to adding a new line in pg_hba.conf for each new user, but
logically better since you have to remember only to set up roles
correctly, not to also enable them to connect to the database.
> Is there a way to run psql scripts in a database fired off from a remote location without going down the trust authentication 'route' in pg_hba.conf?
>
You always have to deal with pg_hba.conf, but if the problem is to
"trust" the monitor user and not trust other users, then use a single
line with md5, ident or what you like and use .pgpass
(http://www.postgresql.org/docs/current/static/libpq-pgpass.html) to
store the connection details (including password) for the monitor
user, so that it will connect smoothly and you will be able to run any
batch operation thru it from the remote machine.
Is this what you are looking for?
Luca
From | Date | Subject | |
---|---|---|---|
Next Message | Birchall, Austen | 2013-08-07 14:03:07 | .pgpass not working |
Previous Message | Birchall, Austen | 2013-08-05 15:46:03 | Re: Running psql commands from a remote location & pg_hba.conf? |