Thread: well, this is a newbie list...

well, this is a newbie list...

From
Richard Tidd
Date:
I have a question regarding the creation of users (I think).  Anyway, I
am running Mandrake 7.2, which installs postgres during the linux
install.  I see during startup that the postmaster is started.  I got
the following result:

[rick@fuller ~]$ createdb mydb
psql: FATAL 1:  SetUserId: user 'rick' is not in 'pg_shadow'
createdb: database creation failed

I assume that this means that my user id is not yet valid under
postgres.  The section in the admin document labelled "Creating Users"
is empty.  The documentation does talk about "becoming user postgres".
I am not sure what I need to do for this either.

Please help.

Rick

Re: well, this is a newbie list...

From
Bruce Tong
Date:
> I assume that this means that my user id is not yet valid under
> postgres.  The section in the admin document labelled "Creating Users"
> is empty.  The documentation does talk about "becoming user postgres".
> I am not sure what I need to do for this either.

First of all, here's the URL of some notes I wrote about 2 years ago. They
should still be good as PostgreSQL hasn't changed much in the "getting
started" arena...

http://pugsly.ev.net/~zztong/public_html_vishnu/postgres

... I think you'll find the notes contained there a acceptable tutorial as
it is basically a journal of my learning the basics.

To more directly answer your question, I can su to the "postgres" user
where the commands "createuser" and "createdb" allow you to create
PostgreSQL users and databases for those users. I have found it convenient
to create db users and databases of the same name as the loginid, as the
"psql" command which is a command line SQL tool will assume the loginid
for both the db user and the database name if you provide no other
arguments.

I hope that helps.

--

Bruce Tong                 |  Got me an office; I'm there late at night.
Sr. Software Engineer      |  Just send me e-mail, maybe I'll write.
Electronic Vision / FITNE  |
zztong@pugsly.ev.net       |  -- Joe Walsh for the 21st Century



Re: well, this is a newbie list...

From
"Fernando M. Maresca"
Date:
On Thu, 4 Jan 2001, Richard Tidd wrote:

> I have a question regarding the creation of users (I think).  Anyway, I
> am running Mandrake 7.2, which installs postgres during the linux
> install.  I see during startup that the postmaster is started.  I got
> the following result:
>
> [rick@fuller ~]$ createdb mydb
> psql: FATAL 1:  SetUserId: user 'rick' is not in 'pg_shadow'
> createdb: database creation failed

su root
password: teh root pass in your machine
then
su postgres
%> CREATE USER rick
folow the simple instructions and exit su.
The user now is postgres recognized.
Luck.
Fernando
>
> I assume that this means that my user id is not yet valid under
> postgres.  The section in the admin document labelled "Creating Users"
> is empty.  The documentation does talk about "becoming user postgres".
> I am not sure what I need to do for this either.
>
> Please help.
>
> Rick
>