dbTalk Databases Forums  

OS X Install

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss OS X Install in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nathan Mealey
 
Posts: n/a

Default OS X Install - 10-15-2004 , 07:09 PM






I am trying to install PostgreSQL on OS X 10.3, using the package from
Entropy.ch. The installation instructions there, as well as anywhere
else I have seen them on the net, say to create a user (using the
System Preferences pane) with a shortname "postgres". The problem is,
this user already exists in my netinfo database/domain, and so I cannot
either create a new user with the same short name, or use this user,
because I do not know the password (I assume it is a system default
user). Thus, I am unable to complete the installation, because I
cannot run the following commands as user postgres.

/usr/local/bin/initdb -D /usr/local/pgsql/data

/usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start

Has anyone else encountered this before? I'm so confused by this...why
does this user already exist, and why can't I make use of it for this
installation? Should I create a different user?

NM
--
Nathan Mealey
Director of Operations
Cycle-Smart, Inc.
P.O. Box 1482
Northampton, MA
01061-1482
nathan (AT) cycle-smart (DOT) com
(413) 587-3133
(413) 210-7984 Mobile
(512) 681-7043 Fax


Reply With Quote
  #2  
Old   
Scott Frankel
 
Posts: n/a

Default Re: OS X Install - 10-15-2004 , 07:43 PM







I recently installed PostGreSQL-7.4.5 on my OSX 10.3.5 system. I did
not, however
have the problem you're encountering. There was no "postgres" user
already
created on my system.

1. It's not like postgres just rolls off the tongue. It's hard to
imagine another user of
your system choosing that name for some reason

2. If the postgres user was created by/during your install, then there
should be some
recourse for setting its password. I don't remember offhand, but I
think NetInfo uses
a klein star "*" to denote that the password is NOT set -- then
allowing you to set it
(hopefully ...)

3. If your is a single user system, I'd say that MAYBE you could
remove the postgres
user and create it fresh to complete the install.

4. I'm still very new to PostGreSQL, but I'd hazard to guess that
there's nothing so
explicitly intrinsic to the username "postgres" that you couldn't
create a new user,
"postgresfoo" and continue with the install instructions using that
username.

G'luck!
Scott



On Oct 15, 2004, at 5:09 PM, Nathan Mealey wrote:

Quote:
I am trying to install PostgreSQL on OS X 10.3, using the package from
Entropy.ch. The installation instructions there, as well as anywhere
else I have seen them on the net, say to create a user (using the
System Preferences pane) with a shortname "postgres". The problem is,
this user already exists in my netinfo database/domain, and so I
cannot either create a new user with the same short name, or use this
user, because I do not know the password (I assume it is a system
default user). Thus, I am unable to complete the installation,
because I cannot run the following commands as user postgres.

/usr/local/bin/initdb -D /usr/local/pgsql/data

/usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start

Has anyone else encountered this before? I'm so confused by
this...why does this user already exist, and why can't I make use of
it for this installation? Should I create a different user?

NM
--
Nathan Mealey
Director of Operations
Cycle-Smart, Inc.
P.O. Box 1482
Northampton, MA
01061-1482
nathan (AT) cycle-smart (DOT) com
(413) 587-3133
(413) 210-7984 Mobile
(512) 681-7043 Fax


Reply With Quote
  #3  
Old   
Arcane_Rhino
 
Posts: n/a

Default Re: OS X Install - 10-15-2004 , 07:56 PM



Nathan:

Yes and no. My guess is that either postgres is now a default user included with the Pather version, you inadvertantly created the user once before (or during installation), or Marc Liyanage (bless his soul) created it for you during installation. Of the three, I doubt it is the latter because, though not infallable, Marc usually puts out pretty good, bug free stuff.

As for myself, I installed PG once under 10.2, then removed it and later, under 10.3 installed it again. I ran into this same problem. I thought at the time it was my fault. Now I am not so sure...

At any rate, the thing to do is to delete the user account both in User Accounts (if it exists) and in NetInfo. I cannot remember if this needs to be done as the root user. I don't think so but it might. Next reboot. This may not be technically necessary but a reboot covers a multitude of sins. The next thing to do is create an account named PostgreSQL Administrator with the postgres short name. Since you now know the password, no problem.

This worked for me. Good luck.

Jeff

Nathan Mealey <nathan (AT) cycle-smart (DOT) com> wrote:
I am trying to install PostgreSQL on OS X 10.3, using the package from
Entropy.ch. The installation instructions there, as well as anywhere
else I have seen them on the net, say to create a user (using the
System Preferences pane) with a shortname "postgres". The problem is,
this user already exists in my netinfo database/domain, and so I cannot
either create a new user with the same short name, or use this user,
because I do not know the password (I assume it is a system default
user). Thus, I am unable to complete the installation, because I
cannot run the following commands as user postgres.

/usr/local/bin/initdb -D /usr/local/pgsql/data

/usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start

Has anyone else encountered this before? I'm so confused by this...why
does this user already exist, and why can't I make use of it for this
installation? Should I create a different user?

NM
--
Nathan Mealey
Director of Operations
Cycle-Smart, Inc.
P.O. Box 1482
Northampton, MA
01061-1482
nathan (AT) cycle-smart (DOT) com
(413) 587-3133
(413) 210-7984 Mobile
(512) 681-7043 Fax

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply With Quote
  #4  
Old   
John DeSoi
 
Posts: n/a

Default Re: OS X Install - 10-16-2004 , 09:08 AM




On Oct 15, 2004, at 8:09 PM, Nathan Mealey wrote:

Quote:
I am trying to install PostgreSQL on OS X 10.3, using the package from
Entropy.ch. The installation instructions there, as well as anywhere
else I have seen them on the net, say to create a user (using the
System Preferences pane) with a shortname "postgres". The problem is,
this user already exists in my netinfo database/domain, and so I
cannot either create a new user with the same short name, or use this
user, because I do not know the password (I assume it is a system
default user). Thus, I am unable to complete the installation,
because I cannot run the following commands as user postgres.

I think the user is there in 10.3 by default. Apple is using PostgreSQL
in one of their products. In order to use postgres (and to have
postgres show up as a normal user available in the login menu) I
deleted the user in NetInfo Manager. You also have to delete the
postgres group. After doing this, I was able to create a postgres user
in the accounts view of System Preferences.

Best,

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
  #5  
Old   
Lint Hasenpfeffer
 
Posts: n/a

Default Re: OS X Install - 10-16-2004 , 04:20 PM



Apple as a nice (yet slightly outdated) write up on settting up pg.
http://developer.apple.com/internet/.../postgres.html

So you can just use the account setup portion. In any case the build it
generally painless.


John :

I can't speak to Server, but its not installed in 10.3 consumer version.


On Oct 16, 2004, at 10:08 AM, John DeSoi wrote:

Quote:
On Oct 15, 2004, at 8:09 PM, Nathan Mealey wrote:

I am trying to install PostgreSQL on OS X 10.3, using the package
from Entropy.ch. The installation instructions there, as well as
anywhere else I have seen them on the net, say to create a user
(using the System Preferences pane) with a shortname "postgres". The
problem is, this user already exists in my netinfo database/domain,
and so I cannot either create a new user with the same short name, or
use this user, because I do not know the password (I assume it is a
system default user). Thus, I am unable to complete the
installation, because I cannot run the following commands as user
postgres.


I think the user is there in 10.3 by default. Apple is using
PostgreSQL in one of their products. In order to use postgres (and to
have postgres show up as a normal user available in the login menu) I
deleted the user in NetInfo Manager. You also have to delete the
postgres group. After doing this, I was able to create a postgres user
in the accounts view of System Preferences.

Best,

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of
broadcast)---------------------------
TIP 8: explain analyze is your friend


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #6  
Old   
Monte Milanuk
 
Posts: n/a

Default Re: OS X Install - 10-16-2004 , 04:56 PM



I'm kind of at the same point: I d/I'd the postgreSQL package from
entropy.ch, and it apparently installed OK. As mentioned, there already
was a postgres user in NetInfo (Panther on an eMac). Tried just
changing the password, home directory, and shell to valid values instead
of '*' and '/dev/null'. Couldn't login via 'su - postgres' at all.
Tried deleting the postgres user in NetInfo, and re-creating via the
Account Manager, but I kept getting an error message that I couldn't use
that name (postgres).

I read the post above about deleting the group info as well; that
allowed me to create a user 'postgres' via the Account Manager. Figure
I'll have to twiddle the home dir and shell and whatnot via NetInfo.
How do I make that user not visible in the login selection? Should I
delete the user 'postgres' in the Account Manager and re-create him w/
the necessary parameters (shell, home dir, password) from the Terminal?

Thanks,

Monte


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #7  
Old   
John DeSoi
 
Posts: n/a

Default Re: OS X Install - 10-17-2004 , 04:20 PM




On Oct 16, 2004, at 5:56 PM, Monte Milanuk wrote:

Quote:
I read the post above about deleting the group info as well; that
allowed me to create a user 'postgres' via the Account Manager.
Figure I'll have to twiddle the home dir and shell and whatnot via
NetInfo. How do I make that user not visible in the login selection?
Should I delete the user 'postgres' in the Account Manager and
re-create him w/ the necessary parameters (shell, home dir, password)
from the Terminal?
I think that would be the easiest approach (delete the account and
recreate it from the command line). Hopefully this will give you a
setup similar to the original one if you don't want postgres in the
login menu. Once you have it in NetInfo, you can set it up like the
other invisible users.

Best,

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
  #8  
Old   
Monte Milanuk
 
Posts: n/a

Default Re: OS X Install - 10-17-2004 , 05:24 PM



John DeSoi wrote:
Quote:
I think that would be the easiest approach (delete the account and
recreate it from the command line). Hopefully this will give you a setup
similar to the original one if you don't want postgres in the login
menu. Once you have it in NetInfo, you can set it up like the other
invisible users.

I went ahead and deleted the postgres user via the Account Manager and
set about creating the account from the command line. A little more
involved than I'd expected; I'd forgotten that OS X, while nominally
UNIX, doesn't use /etc/passwd and /etc/groups the way most of the BSD's
and Linux variants that I've played with do. Had to search the Unix
forum at Apple's Discussion board, and found a link to an article at
O'Reilly's that included details on how to set up a new user and group
from the command line using 'nicl' to manipulate NetInfo (the article
was specifically for Oracle, but it had the info I needed). Double
checked everything in NetInfo, looked good, so I started up postgreSQL.
Seems to be running OK. Now I just need to figure out what I'm going
to do w/ it

Thanks,

Monte


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
  #9  
Old   
Dan Sugalski
 
Posts: n/a

Default Re: OS X Install - 10-17-2004 , 05:42 PM



At 8:09 PM -0400 10/15/04, Nathan Mealey wrote:
Quote:
I am trying to install PostgreSQL on OS X 10.3, using the package
from Entropy.ch. The installation instructions there, as well as
anywhere else I have seen them on the net, say to create a user
(using the System Preferences pane) with a shortname "postgres".
The problem is, this user already exists in my netinfo
database/domain
Note that fink installs a postgres user.
--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
dan (AT) sidhe (DOT) org have teddy bears and even
teddy bears get drunk


Reply With Quote
  #10  
Old   
Joel
 
Posts: n/a

Default Re: OS X Install - 10-18-2004 , 12:09 AM



A few comments --

On Fri, 15 Oct 2004 20:09:42 -0400
Nathan Mealey <nathan (AT) cycle-smart (DOT) com> wrote

Quote:
I am trying to install PostgreSQL on OS X 10.3, using the package from
Entropy.ch. The installation instructions there, as well as anywhere
else I have seen them on the net, say to create a user (using the
System Preferences pane) with a shortname "postgres". The problem is,
this user already exists in my netinfo database/domain, and so I cannot
either create a new user with the same short name, or use this user,
because I do not know the password (I assume it is a system default
user). Thus, I am unable to complete the installation, because I
cannot run the following commands as user postgres.

/usr/local/bin/initdb -D /usr/local/pgsql/data

/usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start

Has anyone else encountered this before? I'm so confused by this...why
does this user already exist, and why can't I make use of it for this
installation? Should I create a different user?
man sudo
man sudoers

And then look up netinfo. I'm pretty sure netinfo is available in the
man, but you can use Google on Apple's site to get plenty of information.

There is no need to give either the postgres user or root a password,
much less a shell or a login directory, if you use sudo.

Deleting the postgres user/group and adding them again should not be
necessary (and will likely change the userid/groupid assigned, if you
don't watch, but I don't know whether that might end up an issue).

(And I have no idea why Apple would suggest using the system preferences
user pane to add the postgres user unless they are intentionally dumbing
it down. It works, but then you have OS login enabled for the "postgres"
user.)

My JPY 2.

--
Joel <rees (AT) ddcom (DOT) co.jp>


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

http://archives.postgresql.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.