X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1878A9FB3FA for ; Thu, 31 Aug 2006 17:05:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 78989-03 for ; Thu, 31 Aug 2006 17:05:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by postgresql.org (Postfix) with ESMTP id E00679FB3F6 for ; Thu, 31 Aug 2006 17:05:28 -0300 (ADT) Received: from [10.0.1.5] ([67.168.251.109]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J4V00EMJP4LDYC3@vms048.mailsrvcs.net> for pgsql-admin@postgresql.org; Thu, 31 Aug 2006 15:05:10 -0500 (CDT) Date: Thu, 31 Aug 2006 13:05:08 -0700 From: "Jeffrey J. Early" Subject: Re: Embedded App and User Authentication In-reply-to: <23225.1157054019@sss.pgh.pa.us> To: Tom Lane Cc: John DeSoi , "pgsql-admin@postgresql.org Admin" Reply-to: jearly@alum.ups.edu Message-id: MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit Thread-topic: [ADMIN] Embedded App and User Authentication Thread-index: AcbNOMHNAGg5bjksEdul/gANk1iQ3g== User-Agent: Microsoft-Entourage/11.2.5.060620 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.025 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/363 X-Sequence-Number: 22906 on 8/31/06 12:53 PM, Tom Lane at tgl@sss.pgh.pa.us wrote: > "Jeffrey J. Early" writes: >> It turns out the problem is with launching postmaster via pg_ctl -- in fact, >> pg_ctl seems to do this user authentication test, but postmaster doesn't. So >> I found that if I launch postmaster directly, no problem. Nice security :-) > > The postmaster may start fine, but are you able to log in? The initial > superuser account is still going to have the old username, so you might > have some issues around obtaining superuser privileges. > > regards, tom lane Seems to work okay. I just successfully embedded it in my app and ran it on a different machine with a different username. I can start postmaster, and login with no problems. When I login I can just specify the user that I want to login as. Basic process is this: 1. initdb -D data -U genericuser 2. nohup postmaster -D data >postgres.log 2>&1 loaddata.log 5. psql -d test -U genericuser So if you replace step 2 with: pg_ctl start -w -D $data -s -l postgres.log Then the database won't start and this won't work. But otherwise I seem to have completely access as I need it on any and all machines. Jeffrey