Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id NAA18527 for postgres-redist; Mon, 6 Feb 1995 13:25:45 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199502062125.NAA18527@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from RASAM.NDIM.EDRC.CMU.EDU (RASAM.NDIM.EDRC.CMU.EDU [128.2.214.234]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id NAA18517 for <postgres@postgres.berkeley.edu>; Mon, 6 Feb 1995 13:25:44 -0800
Received: from Messages.8.5.N.CUILIB.3.45.SNAP.NOT.LINKED.rasam.ndim.edrc.cmu.edu.pmax.ul4
          via MS.5.6.rasam.ndim.edrc.cmu.edu.pmax_ul4;
          Mon,  6 Feb 1995 16:25:15 -0500 (EST)
Message-ID: <kjBdCvi00hPeIC3XFC@cs.cmu.edu>
Date: Mon,  6 Feb 1995 16:25:15 -0500 (EST)
From: Robert.Patrick@cs.cmu.edu
To: postgres@postgres.Berkeley.EDU
Subject: Re: creation problem
In-Reply-To: <9502050151.AA13295@dec324.aist-nara.ac.jp>
References: <9502050151.AA13295@dec324.aist-nara.ac.jp>
X-Sender: rp2y@RASAM.NDIM.EDRC.CMU.EDU
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Mon, 06 Feb 95 13:25:45 -0800
Resent-XMts: smtp

Excerpts from internet.postgres: 5-Feb-95 creation problem Drunkard
Terry@is.aist-n (1239*)

> Now, I tried to create new database. 
> "make" finish, so I use command to create the database.

> ---------------------------------
> dec324[150]% createdb temp
> FATAL 1:Feb  5 10:34:58:User yutaka-i is not in pg_user
>  
> createdb: database creation failed on temp.
> ---------------------------------

> I thought "I'll create my username on postgres."
> so I used "createuser" command.

> ---------------------------------
> dec324[152]% createuser yutaka-i
> createuser: database access failed.
> ---------------------------------

> why not? postmaster is running, initdb has finished.
> There are something else to create database?

> Machine is DECstation 5000/25.
> Postgres version is v4r0.

The problem is that when you compile Postgres, the only user who can do
anything initially is the user specified in Makefile.global in the
"POSTGRESLOGIN" variable.

To use "createuser", you have one of two choices:

1.)  Login as the user specified in Makefile.global (usually user
"postgres" unless you changed it). and add yourself as a user with
createuser.

2.) Edit the file $POSTGRESHOME/data/files/global1.bki and add yourself
to the pg_user class (See example below).  After doing this, you will
need to rerun initdb.

example:
There should be a line that looks similar to this in global1.bki:

insert OID = 0 ( postgres 6543 t t t t )

postgres is the database superuser's login
6543 is the superuser's Unix UID.

To have yourself added as a superuser of the database, add the following
line directly below the one shown above:

insert OID = 1 ( rp2y 3456 t t t t )

where rp2y is your login name
    and 3456 is your Unix UID.

NOTE:  This file is ONLY used by "initdb" so you will need to run
"cleardbdir" and then "initdb".

Robert

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
