Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Tim Uckun" <timuckun(at)gmail(dot)com>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.
Date: 2009-11-09 10:19:05
Message-ID: c9f3bb1a-8418-4f40-ab36-09f4048d806d@mm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tim Uckun wrote:

> This script is a part of the initial setup script for the server. It
> has to run as root because when it starts running postgres is not
> installed and there is no postgres user.

But afterwards, inside the script, you could use su to temporarily switch to
a less priviledged user:

... commands running as root
su postgres -c 'psql ....' # running as postgres
... running as root again

And su doesn't ask for a password when it's run by root.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Edwards 2009-11-09 10:57:08 Which locale to use for multiple-language support?
Previous Message Anders Moe 2009-11-09 08:47:48 Not possible to create 64 bit windows clients ?