Postgres + MD5 Auth

Francesco Casadei fcasadei at
Tue Apr 8 05:42:26 PDT 2003

On Mon, Apr 07, 2003 at 10:39:23AM +0100, Wayne Pascoe wrote:
> Hi all,
> Sorry to bug twice on one day, but does anyone know what I have to
> change in the startup scripts for PostgreSQL ( to make it
> work with password authentication?
> I've setup pg_hba.conf to use encrypted passwords (md5), but then
> starting Postgres prompts for a password. This is not great for when the
> machine reboots and no-one is around to enter this.
> Is there any way of passing pgsql's password to the script ? 
> Thanks,
> -- 
> Wayne Pascoe
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"
> end of the original message

From man pg_ctl:

       -w     Wait  for  the start or shutdown to complete. Times
          out after 60 seconds. This is the default for shut-

       -W     Do not wait for start or shutdown to complete. This
          is the default for starts and restarts.

So, this is how I start up PostgreSQL with password authentication (note the
capitol letter -W, not -w):

    [ -d ${PREFIX}/lib ] && /sbin/ldconfig -m ${PREFIX}/lib
    touch /var/log/pgsql
    chmod 600 /var/log/pgsql
    chown pgsql:pgsql /var/log/pgsql
    [ -x ${PGBIN}/pg_ctl ] && {
    su -l pgsql -c \
        '[ -d ${PGDATA} ] && exec /usr/local/bin/pg_ctl start -s -W -l /var/log/pgsql'
    echo -n ' pgsql'


	Francesco Casadei
You can download my public key from
or retrieve it from a keyserver (,, ...)

Key fingerprint is: 1671 9A23 ACB4 520A E7EE  00B0 7EC3 375F 164E B17B

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list