No user being created during initdb for OS X

Started by Jamie Deppelerover 20 years ago7 messages
#1Jamie Deppeler
jamie@doitonce.net.au

Hi,

Having an issue with 10.4.2 at the moment when i initialize the
database no user is being created.

I have setup Postgresql 8.0.3 on 10.3 without any issue, has anyone come
accross this problem before?

#2Thomas F. O'Connell
tfo@sitening.com
In reply to: Jamie Deppeler (#1)
Re: No user being created during initdb for OS X

Do you already have a postgres user on the system? And do you mean
that initdb is not creating a postgres user in the database?
Presumably, if run as the user that will own the server process, it
should create that user in the database as well.

http://www.postgresql.org/docs/8.0/static/app-initdb.html

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i™

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Jul 20, 2005, at 8:35 PM, Jamie Deppeler wrote:

Show quoted text

Hi,

Having an issue with 10.4.2 at the moment when i initialize the
database no user is being created.

I have setup Postgresql 8.0.3 on 10.3 without any issue, has anyone
come accross this problem before?

#3Jamie Deppeler
jamie@doitonce.net.au
In reply to: Thomas F. O'Connell (#2)
Re: [HACKERS] No user being created during initdb for OS X

I am doing it right
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

Thomas F. O'Connell wrote:

Show quoted text

Do you already have a postgres user on the system? And do you mean
that initdb is not creating a postgres user in the database?
Presumably, if run as the user that will own the server process, it
should create that user in the database as well.

http://www.postgresql.org/docs/8.0/static/app-initdb.html

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i�

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Jul 20, 2005, at 8:35 PM, Jamie Deppeler wrote:

Hi,

Having an issue with 10.4.2 at the moment when i initialize the
database no user is being created.

I have setup Postgresql 8.0.3 on 10.3 without any issue, has anyone
come accross this problem before?

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

#4Dave Cramer
pg@fastcrypt.com
In reply to: Jamie Deppeler (#3)
Re: [HACKERS] No user being created during initdb for OS X

I guess the next obvious question is why do you think there isn't a
user? What is the error message ?

Dave
On 21-Jul-05, at 12:38 AM, Jamie Deppeler wrote:

I am doing it right
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

Thomas F. O'Connell wrote:

Do you already have a postgres user on the system? And do you
mean that initdb is not creating a postgres user in the
database? Presumably, if run as the user that will own the server
process, it should create that user in the database as well.

http://www.postgresql.org/docs/8.0/static/app-initdb.html

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i™

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Jul 20, 2005, at 8:35 PM, Jamie Deppeler wrote:

Hi,

Having an issue with 10.4.2 at the moment when i initialize the
database no user is being created.

I have setup Postgresql 8.0.3 on 10.3 without any issue, has
anyone come accross this problem before?

---------------------------(end of
broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of
broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Dave Cramer
davec@postgresintl.com
www.postgresintl.com
ICQ #14675561
jabber davecramer@jabber.org
ph (519 939 0336 )

#5Andrew Dunstan
andrew@dunslane.net
In reply to: Thomas F. O'Connell (#2)
Re: No user being created during initdb for OS X

Thomas F. OConnell said:

Do you already have a postgres user on the system? And do you mean
that initdb is not creating a postgres user in the database?
Presumably, if run as the user that will own the server process, it
should create that user in the database as well.

http://www.postgresql.org/docs/8.0/static/app-initdb.html

1. initdb *must* be run by the user that will own the server process or you
will get the permissions all wrong.

2. initdb will only create one user, as specified by -U and defaulting to
the name of the user running initdb. Thus it will only ever create a user
called postgres if a user called postgres if '-U postgres' is specified, or
if -U is not used and the user running initdb is called postgres. So no "as
well".

3. the code to set up the user is actually contained in the BKI file.
initdb's role is limited to substitituting the name of the user specified
above for the token "POSTGRES" in that file before passing it to the
bootstrap process.

cheers

andrew

#6Michael Fuhr
mike@fuhr.org
In reply to: Jamie Deppeler (#3)
Re: [HACKERS] No user being created during initdb for OS X

On Thu, Jul 21, 2005 at 02:38:51PM +1000, Jamie Deppeler wrote:

I am doing it right
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

How are you determining that "no user is being created"? What are
you doing and what's the exact error message?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#7Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#5)
Re: No user being created during initdb for OS X

Andrew Dunstan wrote:

2. initdb will only create one user, as specified by -U and defaulting to
the name of the user running initdb. Thus it will only ever create a user
called postgres if '-U postgres' is specified, or
if -U is not used and the user running initdb is called postgres.

grammar fixed above so it makes sense

4. if you want to see what user(s) it knows about, shut down the
postmaster and run postgres in standalone mode like this:

echo 'select usename from pg_user' | /pathto/postgres -D /pathto/data
template1

cheers

andrew