From owner-freebsd-questions@FreeBSD.ORG Tue Apr 8 05:42:25 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A79DF37B43A for ; Tue, 8 Apr 2003 05:42:24 -0700 (PDT) Received: from mail.tiscali.it (mail-1.tiscali.it [195.130.225.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id 744F343F3F for ; Tue, 8 Apr 2003 05:42:23 -0700 (PDT) (envelope-from fcasadei@inwind.it) Received: from goku.kasby (217.133.210.226) by mail.tiscali.it (6.5.032) id 3E886D45004A8855 for freebsd-questions@freebsd.org; Tue, 8 Apr 2003 14:42:21 +0200 Received: (qmail 1598 invoked by uid 1000); 8 Apr 2003 12:42:11 -0000 Date: Tue, 8 Apr 2003 14:42:11 +0200 From: Francesco Casadei To: Wayne Pascoe Message-ID: <20030408124211.GA1579@goku.kasby> Mail-Followup-To: Wayne Pascoe , freebsd-questions@freebsd.org References: <20030407093923.GB604@marvin.penguinpowered.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <20030407093923.GB604@marvin.penguinpowered.org.uk> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 4.8-STABLE i386 cc: freebsd-questions@freebsd.org Subject: Re: Postgres + MD5 Auth X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2003 12:42:26 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 07, 2003 at 10:39:23AM +0100, Wayne Pascoe wrote: > Hi all, >=20 > Sorry to bug twice on one day, but does anyone know what I have to > change in the startup scripts for PostgreSQL (010.pgsql.sh) to make it > work with password authentication? >=20 > 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. >=20 > Is there any way of passing pgsql's password to the script ?=20 >=20 > Thanks, >=20 > --=20 > Wayne Pascoe > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > end of the original message =46rom man pg_ctl: [...] -w Wait for the start or shutdown to complete. Times out after 60 seconds. This is the default for shut- downs. -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): [...] start) [ -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 --=20 You can download my public key from http://digilander.libero.it/fcasadei/ or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...) Key fingerprint is: 1671 9A23 ACB4 520A E7EE 00B0 7EC3 375F 164E B17B --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+ksOjfsM3XxZOsXsRAgxzAJwKsmkEiWxh2J8T/J5hKhJmPxCoZgCdGYOl 5gJuazdCkN9/kSYIlPcv6e4= =YV/w -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--