pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeffrey J. Early <jearly@alum.ups.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John DeSoi <desoi@pgedit.com>
Cc: pgsql-admin@postgresql.org Admin <pgsql-admin@postgresql.org>
Subject: Re: Embedded App and User Authentication
Date: Thu, 31 Aug 2006 13:05:08 -0700
Message-ID: <C11C8F04.10F92%jearly@alum.ups.edu> (raw)
In-Reply-To: <23225.1157054019@sss.pgh.pa.us>

on 8/31/06 12:53 PM, Tom Lane at tgl@sss.pgh.pa.us wrote:

> "Jeffrey J. Early" <jearly@alum.ups.edu> 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 </dev/null &

3. createdb test -U genericuser

4. psql -d test  -f data.sql -U genericuser > 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





view thread (7+ messages)

Message-ID: <C11C8F04.10F92%jearly@alum.ups.edu>
Permalink:  ../C11C8F04.10F92%25jearly@alum.ups.edu/
Also on:    postgresql.org/message-id/C11C8F04.10F92%jearly@alum.ups.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jearly@alum.ups.edu, tgl@sss.pgh.pa.us, desoi@pgedit.com
  Subject: Re: Embedded App and User Authentication
  In-Reply-To: <C11C8F04.10F92%jearly@alum.ups.edu>
  References: <23225.1157054019@sss.pgh.pa.us> <C11C8F04.10F92%jearly@alum.ups.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox