pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql initial superuser
6+ messages / 4 participants
[nested] [flat]

* pgsql initial superuser
@ 2004-02-16 17:24 Pedro Almeida <niker@netvisao.pt>
  2004-02-16 20:09 ` Re: pgsql initial superuser Peter Eisentraut <peter_e@gmx.net>
  2004-02-16 20:51 ` Re: pgsql initial superuser Pedro Almeida <niker@netvisao.pt>
  2004-06-03 12:21 ` Re: pgsql initial superuser V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
  0 siblings, 3 replies; 6+ messages in thread

From: Pedro Almeida @ 2004-02-16 17:24 UTC (permalink / raw)
  To: pgsql-admin

Hello. this is my "first" time using pgsql, and I seem to be running to 
a bit of a corner here :-)

I've understood how to add a superuser/database-user/user but I have no 
user to begin with.

~# createuser superuser
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:  user "root" does not exist
createuser: creation of user "superuser" failed

So I need someway to add a user so I can add others. I belive this is 
done in the pg_hba.conf file, but so far I've been unlucky. I'm using 
the debian distributed pg_hba.conf file set up for local access, and I 
tried the following lines, each a complete failure:

pg_hba.conf
<snip>
local all root md5
#OR
#local all root ident
<snip>

Even with "createuser blabla -Uroot -W" and using the "ident" auth 
method fails. What am I missing here?

Thank you for the support :-D




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql initial superuser
  2004-02-16 17:24 pgsql initial superuser Pedro Almeida <niker@netvisao.pt>
@ 2004-02-16 20:09 ` Peter Eisentraut <peter_e@gmx.net>
  2 siblings, 0 replies; 6+ messages in thread

From: Peter Eisentraut @ 2004-02-16 20:09 UTC (permalink / raw)
  To: Pedro Almeida <niker@netvisao.pt>; pgsql-admin

Pedro Almeida wrote:
> So I need someway to add a user so I can add others.

There should be a predefined user named "postgres".




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql initial superuser
  2004-02-16 17:24 pgsql initial superuser Pedro Almeida <niker@netvisao.pt>
@ 2004-02-16 20:51 ` Pedro Almeida <niker@netvisao.pt>
  2 siblings, 0 replies; 6+ messages in thread

From: Pedro Almeida @ 2004-02-16 20:51 UTC (permalink / raw)
  To: pgsql-admin

That was it - user 'postgres', owner of postmaster, has got what it takes.

Thank you for solving my problem and giving me some extra tips to work on.

I will now continue lurking on the ML and watching closely your 
discussions. Good bye then :-)





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql initial superuser
  2004-02-16 17:24 pgsql initial superuser Pedro Almeida <niker@netvisao.pt>
@ 2004-06-03 12:21 ` V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
  2 siblings, 0 replies; 6+ messages in thread

From: V i s h a l Kashyap @ [Sai Hertz And Control Systems] @ 2004-06-03 12:21 UTC (permalink / raw)
  To: pgsql-admin

Dear Pedro ,

> Hello. this is my "first" time using pgsql, and I seem to be running 
> to a bit of a corner here :-)
>
> I've understood how to add a superuser/database-user/user but I have 
> no user to begin with.
>
> ~# createuser superuser
> 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:  user "root" does not exist
> createuser: creation of user "superuser" failed
>

If you have compiled PostgreSQL then the user login  used for initdb is 
the default user
else
this was from  rpm then postgres  is the super user
you may login as

psql -U postgres template1

-- 
Regards,
Vishal Kashyap
Director / Lead Software Developer,
Sai Hertz And Control Systems Pvt Ltd,
http://saihertz.rediffblogs.com
Jabber IM: vishalkashyap[ a t ]jabber.org
ICQ :      264360076
Yahoo  IM: mailforvishal[ a t ]yahoo.com
-----------------------------------------------
You yourself, as much as anybody in the entire
universe, deserve your love and affection.
- Buddha
---------------
pgsql=# select marital_status from vishals_life;

marital_status
------------------
Single not looking

1 Row(s) affected





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql initial superuser
@ 2004-02-16 18:43 Pedro Almeida <niker@netvisao.pt>
  2004-02-16 19:48 ` Re: pgsql initial superuser Gémes Géza <geza@kzsdabas.sulinet.hu>
  0 siblings, 1 reply; 6+ messages in thread

From: Pedro Almeida @ 2004-02-16 18:43 UTC (permalink / raw)
  To: pgsql-admin

kaolin fire wrote:

> try user 'pgsql' :) that's the default initially created superuser, no 
> password (it would be good to give it one).
>
> -kaolin fire
> -http://erif.org/code/fallingup/ for a 'spin' on tetris
>
>
That was a quick response :-)

using a clean pg_hba.conf file (no user lines added), this is what happened:

*******
~# createuser -Upgsql
Enter name of user to add: blabla
Shall the new user be allowed to create databases? (y/n) n
Shall the new user be allowed to create more new users? (y/n) n
psql: FATAL:  IDENT authentication failed for user "pgsql"

createuser: creation of user "blabla" failed
*******

What am I doing wrong ?



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql initial superuser
  2004-02-16 18:43 Re: pgsql initial superuser Pedro Almeida <niker@netvisao.pt>
@ 2004-02-16 19:48 ` Gémes Géza <geza@kzsdabas.sulinet.hu>
  0 siblings, 0 replies; 6+ messages in thread

From: Gémes Géza @ 2004-02-16 19:48 UTC (permalink / raw)
  To: Pedro Almeida <niker@netvisao.pt>; +Cc: pgsql-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pedro Almeida írta:
| kaolin fire wrote:
|
|> try user 'pgsql' :) that's the default initially created superuser, no
|> password (it would be good to give it one).
|>
|> -kaolin fire
|> -http://erif.org/code/fallingup/ for a 'spin' on tetris
|>
|>
| That was a quick response :-)
|
| using a clean pg_hba.conf file (no user lines added), this is what
| happened:
|
| *******
| ~# createuser -Upgsql
| Enter name of user to add: blabla
| Shall the new user be allowed to create databases? (y/n) n
| Shall the new user be allowed to create more new users? (y/n) n
| psql: FATAL:  IDENT authentication failed for user "pgsql"
|
| createuser: creation of user "blabla" failed
| *******
|
| What am I doing wrong ?
|
| ---------------------------(end of broadcast)---------------------------
| TIP 9: the planner will ignore your desire to choose an index scan if your
|      joining column's datatypes do not match

Add a line:
local  all     all     ident   sameuser
to your pg_hba.conf
restart postgresql
find out under what userid is your postgresql running typicaly it would
be postgres, I'll supose that it is postgres:
su postgres
and do whatever you like with your database cluster.
Because of this I would suggest as a first step to do:
psql template1
SQL commands follow:
ALTER USER postgres password='SomeReallyBigSecretHere' ;

Hope it helps.

Cheers,

Geza
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAMR6G/PxuIn+i1pIRAoaAAKCBALjM0r1nQ3K8anMwrDh/BGscOgCggs18
V+YlMMBEGys7jd7LzfV5M0Y=
=udMf
-----END PGP SIGNATURE-----




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2004-06-03 12:21 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-16 17:24 pgsql initial superuser Pedro Almeida <niker@netvisao.pt>
2004-02-16 20:09 ` Peter Eisentraut <peter_e@gmx.net>
2004-02-16 20:51 ` Pedro Almeida <niker@netvisao.pt>
2004-06-03 12:21 ` V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
2004-02-16 18:43 Re: pgsql initial superuser Pedro Almeida <niker@netvisao.pt>
2004-02-16 19:48 ` Gémes Géza <geza@kzsdabas.sulinet.hu>

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