pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddb user named 'root'
2+ messages / 2 participants
[nested] [flat]
* db user named 'root'
@ 2006-02-09 00:18 Atul Shah <atul.shah@hci.utah.edu>
0 siblings, 1 reply; 2+ messages in thread
From: Atul Shah @ 2006-02-09 00:18 UTC (permalink / raw)
To: pgsql-admin
Hello,
I have recently installed postgresql on a x486 box running debian linux,
as a prelude to installing an open source bioinformatics system called
the longhorn array database (lad). The lad install requires you to
create a postgres user named 'root' with create priveleges, in order to
run an install script (which presumably creates a database as owner
root). I am able to create a db user named 'root', but get an error
when trying to create a db as root.
As postgres (db superuser):
createuser -s -d root
CREATE ROLE
su root
createdb root_db
createdb: could not connect to database template1: FATAL: user "root"
does not exist
psql
psql: FATAL: database "root" does not exist
But the user root exists in the system:
As postgres:
psql
List of roles
Role name | Superuser | Create role | Create DB | Connections | Member
of
-----------+-----------+-------------+-----------+-------------+--------
---
atul | yes | yes | yes | no limit |
postgres | yes | yes | yes | no limit |
root | yes | yes | yes | no limit |
(3 rows)
This shows that root is registered as a db user.
Also, postgres can create a database for root:
As postgres:
createdb -O root root_db
CREATE DATABASE
A database was successfully created with owner 'root':
As postgres:
psql -l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
atul | atul | SQL_ASCII
postgres | postgres | SQL_ASCII
root_db | root | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(5 rows)
But root cannot access it-in fact postgres says the database does not
exist!
As postgres:
su root
psql root_db
psql: FATAL: database "root_db" does not exist!
Can anyone tell what's going on here? Why won't postgres allow root to
createdb himself, or to use psql?
Thanks in advance for your help!
Atul
Huntsman Cancer Institute wishes to promote open communication while protecting confidential and/or privileged information. If you have received this message in error, please inform the sender and delete all copies.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: db user named 'root'
@ 2006-02-09 00:43 Tom Lane <tgl@sss.pgh.pa.us>
parent: Atul Shah <atul.shah@hci.utah.edu>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2006-02-09 00:43 UTC (permalink / raw)
To: Atul Shah <atul.shah@hci.utah.edu>; +Cc: pgsql-admin
"Atul Shah" <atul.shah@hci.utah.edu> writes:
> As postgres (db superuser):
> createuser -s -d root
> CREATE ROLE
> su root
> createdb root_db
> createdb: could not connect to database template1: FATAL: user "root"
> does not exist
Works for me. Are you sure that you are talking to the same postmaster
in both cases? It's possible that root and postgres have different PATH
settings or different PGPORT settings or some such.
> Huntsman Cancer Institute wishes to promote open communication while =
> protecting confidential and/or privileged information. If you have =
> received this message in error, please inform the sender and delete all =
> copies.
You do realize how silly you look with this sort of mumbo-jumbo attached
to mail to an open mailing list, don't you? Even for private mail, do
your lawyers actually think that this accomplishes anything except
wasting people's disk space?
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-02-09 00:43 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-09 00:18 db user named 'root' Atul Shah <atul.shah@hci.utah.edu>
2006-02-09 00:43 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox