Re: pgsql password when FreeBSD boots -- what's usual?

From: Joel Rees <joel(at)alpsgiken(dot)gr(dot)jp>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: pgsql password when FreeBSD boots -- what's usual?
Date: 2003-04-03 06:55:26
Message-ID: 20030403155400.78BB.JOEL@alpsgiken.gr.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > During the bootup monologue, in the middle of init-ing the usual daemon
> > processes, I suddenly get a Password: prompt. I enter the postgres
> > user's password for the one database I'm running, and pgsql prints its
> > name out and boot proceeds otherwise normally.
>
> Is your boot script launching the postmaster via "pg_ctl"? If so, try
> telling pg_ctl not to wait for the postmaster to start (-W option I
> think)

Okay, here's the line from /usr/local/etc/rc.d/022.pgsql.sh:

su -l postgres -c \
'[ -d ${PGDATA} ] && exec /usr/local/bin/pg_ctl start -s -w -o "-i" -l /var/log/pgsql'

Checked the man page, then just removed the -w, and it seems to be
running fine without asking for postgres's database password during boot.

Thanks.

(So now I'm wondering if the -i option for postmaster could be specified
in the postmaster.opts.default file mentioned in the man page for pg_ctl.
More things to play with later, I guess.)

> > I should note that after logging in, I usually sudo -u postgres tcsh,
> > and use pg_ctl from there, and I never get prompted for the password.
>
> That seems odd if you do get prompted during boot. Mind telling us
> exactly what you've got in pg_hba.conf?

local webbedfriend password
local all password
host webbedfriend 127.0.0.1 255.255.255.255 password

host all 127.0.0.1 0.0.0.0 reject

That's going to change as soon as I get time to play around with
privileges some more, but that's how it is now.

Of course, thinking about what Sean posted, and considering that I use
pg_ctl from the command line, rather than calling it through pgsql.sh,
I'm no longer puzzled.

Thanks again. And thanks to Sean, too.

--
Joel Rees <joel(at)alpsgiken(dot)gr(dot)jp>

(I hate it when I forget to address the list.)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2003-04-03 06:58:14 Re: Postgresql capabilities question
Previous Message Jean-Christian Imbeault 2003-04-03 06:40:42 Re: unable to dump database, toast errors