Re: Cant create new users or databases

From: John McKown <joarmc(at)swbell(dot)net>
To: AlphaByte <alan(at)alphabyte(dot)co(dot)nz>
Cc: pgsql list - general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cant create new users or databases
Date: 2000-09-16 13:14:14
Message-ID: Pine.LNX.4.21.0009160810010.27894-100000@linux2.johnmckown.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 16 Sep 2000, AlphaByte wrote:

> Can someone point out to me what I am doing wrong here? I
> can't seem to find this in the documentation anywhere.
>
> [root(at)alphabyte abyte]# createuser abyte
> Shall the new user be allowed to create databases? (y/n) y
> Shall the new user be allowed to create more new users? (y/n) y
> NOTICE: mdopen: couldn't open /var/lib/pgsql/pg_shadow: Permission denied
> NOTICE: RelationIdBuildRelation: smgropen(pg_shadow): Permission denied
> NOTICE: mdopen: couldn't open /var/lib/pgsql/pg_shadow: Permission denied
> NOTICE: mdopen: couldn't open /var/lib/pgsql/pg_shadow: Permission denied
> psql: FATAL 1: cannot open relation pg_shadow
> createuser: creation of user "abyte" failed

It appears that you are logged in as "root". I think that you need to
login as "postgres" to do the first "creatuser" command. When PostgreSQL
is first installed, the only valid user is "postgres" and is the
equivalent to UNIX's "root" (superuser). It has been a while, but as I
recall, when I installed PostgreSQL, this is what I had to do. I logged in
as "postgres", did a "creatuser" for my "normal" (non-root) userid. This
userid was allowed to create new users and databases. Since then, I have
used my "normal" userid to do all the PostgreSQL maintenance
activities. You may need to do something slightly different if you have
multiple users. I am the only one using my Linux system at present.

I hope this helps some,
John

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Horst Herb 2000-09-16 15:10:08 os.h
Previous Message AlphaByte 2000-09-16 11:49:49 Cant create new users or databases