Thread: pq_shadow

pq_shadow

From
"webmaster"
Date:
I am writing you because I am new to Postgesql and I have encountered a pro=
blem that I have not been able to solve through your doc's or mailing list.
The problem is with the createuser utility. When I try to create a user I g=
et the following error:

##################################################################
[root@crescent1 root]# createuser webmaster -P
Enter password for user "webmaster":
Enter it again:
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
psql: FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
createuser: creation of user "webmaster" failed
[root@crescent1 root]#
##################################################################

I would like to be able to use Postgresql (not just Mysql) but if I can not=
 create a user I can not login to the Postgres data base. I advise me on ho=
w to fix this problem.=20

I am using Red Hat 6.2 on a Intel based x86 with a Pentium CPU.

Eric Williams

Re: pq_shadow

From
Peter Eisentraut
Date:
webmaster writes:

> [root@crescent1 root]# createuser webmaster -P
> Enter password for user "webmaster":
> Enter it again:
> 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
> psql: FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
> createuser: creation of user "webmaster" failed
> [root@crescent1 root]#

createuser needs to connect to the database in order to create new users.
In order to connect to the database, it needs to connect with an *already
existing* database user name.  "root" is apparently no such user name.
If this is a newly initdb'ed site, then the only user name that exists is
"postgres" (or whatever the name of your Unix PostgreSQL account).  Either
you login in (su) as postgres, or you use createuser -U postgres.

Incidentally, this is not a bug and should be posted elsewhere.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/