Re: Cant create new users or databases - Mailing list pgsql-general

From John McKown
Subject Re: Cant create new users or databases
Date
Msg-id Pine.LNX.4.21.0009160810010.27894-100000@linux2.johnmckown.net
Whole thread Raw
In response to Cant create new users or databases  (AlphaByte <alan@alphabyte.co.nz>)
List 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@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


pgsql-general by date:

Previous
From: AlphaByte
Date:
Subject: Cant create new users or databases
Next
From: "Horst Herb"
Date:
Subject: os.h