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

From Daniel Verite
Subject Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.
Date
Msg-id c9f3bb1a-8418-4f40-ab36-09f4048d806d@mm
Whole thread Raw
In response to Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.  (Tim Uckun <timuckun@gmail.com>)
Responses Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.  (Tim Uckun <timuckun@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Alexandra Roy
Date:
Subject: PostgreSQL 8.3.8 on AIX5.3 : compilation failed
Next
From: Alban Hertroys
Date:
Subject: Re: virtualidx exclusive lock