Re: Running psql commands from a remote location & pg_hba.conf?

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: Running psql commands from a remote location & pg_hba.conf?
Дата
Msg-id CAKoxK+4Hr0A8peSS=cvKwDidcUqFWdELh3TDudWW0HHB8hCpWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Running psql commands from a remote location & pg_hba.conf?  ("Birchall, Austen" <austen.birchall@metoffice.gov.uk>)
Ответы .pgpass not working  ("Birchall, Austen" <austen.birchall@metoffice.gov.uk>)
sudo/access to the postres OS user  ("Birchall, Austen" <austen.birchall@metoffice.gov.uk>)
Список pgsql-novice
On Mon, Aug 5, 2013 at 5:46 PM, Birchall, Austen
<austen.birchall@metoffice.gov.uk> wrote:
> And thanks once again for your assistance. Yes a role would work although I would have to remember to add any new
usersto 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


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Birchall, Austen"
Дата:
Сообщение: Re: Running psql commands from a remote location & pg_hba.conf?
Следующее
От: "Birchall, Austen"
Дата:
Сообщение: .pgpass not working