Обсуждение: OS X Install

Поиск
Список
Период
Сортировка

OS X Install

От
Nathan Mealey
Дата:
<color><param>05CA,05CA,05CA</param>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.


<fontfamily><param>Courier</param>/usr/local/bin/initdb -D
/usr/local/pgsql/data</fontfamily><fontfamily><param>Georgia</param><x-tad-bigger>


</x-tad-bigger></fontfamily><fontfamily><param>Courier</param>/usr/local/bin/pg_ctl
-D /usr/local/pgsql/data -l postgres.log start</fontfamily>


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@cycle-smart.com

(413) 587-3133

(413) 210-7984 Mobile

(512) 681-7043 Fax

</color>
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@cycle-smart.com
(413) 587-3133
(413) 210-7984 Mobile
(512) 681-7043 Fax

Re: OS X Install

От
Scott Frankel
Дата:

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:


<excerpt><color><param>05C9,05C9,05C9</param>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.


<fontfamily><param>Courier</param>/usr/local/bin/initdb -D
/usr/local/pgsql/data</fontfamily><fontfamily><param>Georgia</param><x-tad-bigger>


</x-tad-bigger></fontfamily><fontfamily><param>Courier</param>/usr/local/bin/pg_ctl
-D /usr/local/pgsql/data -l postgres.log start</fontfamily>


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@cycle-smart.com

(413) 587-3133

(413) 210-7984 Mobile

(512) 681-7043 Fax

</color></excerpt>

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:

> 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@cycle-smart.com
> (413) 587-3133
> (413) 210-7984 Mobile
> (512) 681-7043 Fax

Re: OS X Install

От
Arcane_Rhino
Дата:
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@cycle-smart.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@cycle-smart.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

Re: OS X Install

От
John DeSoi
Дата:
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


Re: OS X Install

От
Lint Hasenpfeffer
Дата:
Apple as a nice (yet slightly outdated) write up on settting up pg.
http://developer.apple.com/internet/opensource/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:

>
> 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
>


Re: OS X Install

От
Monte Milanuk
Дата:
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

Re: OS X Install

От
John DeSoi
Дата:
On Oct 16, 2004, at 5:56 PM, Monte Milanuk wrote:

> 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


Re: OS X Install

От
Monte Milanuk
Дата:
John DeSoi wrote:
> 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

Re: OS X Install

От
Dan Sugalski
Дата:
At 8:09 PM -0400 10/15/04, 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

Note that fink installs a postgres user.
-- 
                                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk

Re: OS X Install

От
Joel
Дата:
A few comments --

On Fri, 15 Oct 2004 20:09:42 -0400
Nathan Mealey <nathan@cycle-smart.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?

    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@ddcom.co.jp>


Re: OS X Install

От
John DeSoi
Дата:
On Oct 18, 2004, at 1:09 AM, Joel wrote:

> 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.
>
>
> (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.)


Because some Mac users prefer to use the Finder to manipulate files
rather than the Terminal :).

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


Re: OS X Install

От
David Teran
Дата:
> 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.
>
One thing is for sure: MacOS X, neither panther (10.3) nor jaguar
(10.2) have a user named 'postgres' as default. And Apple Remote
Desktop 2.x which uses internally a postgres 7.3.2 database to store
statistic data does not use the postgres user afaik, it uses root...

regards David


Re: OS X Install

От
John DeSoi
Дата:
On Oct 21, 2004, at 4:43 AM, David Teran wrote:

> One thing is for sure: MacOS X, neither panther (10.3) nor jaguar
> (10.2) have a user named 'postgres' as default. And Apple Remote
> Desktop 2.x which uses internally a postgres 7.3.2 database to store
> statistic data does not use the postgres user afaik, it uses root...

I'll take your word for it. I just can't recall creating one, yet it
was there. Maybe from something I did with fink. I see a mysql user
also. I know I did not create or install that :).

Best,

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


Re: OS X Install

От
Dan Sugalski
Дата:
At 9:20 AM -0400 10/21/04, John DeSoi wrote:
>On Oct 21, 2004, at 4:43 AM, David Teran wrote:
>
>>One thing is for sure: MacOS X, neither panther (10.3) nor jaguar
>>(10.2) have a user named 'postgres' as default. And Apple Remote
>>Desktop 2.x which uses internally a postgres 7.3.2 database to
>>store statistic data does not use the postgres user afaik, it uses
>>root...
>
>I'll take your word for it. I just can't recall creating one, yet it
>was there. Maybe from something I did with fink. I see a mysql user
>also. I know I did not create or install that :).

Fink creates a postgres user, amongst others, as part of the base
install. (Well, it's one of the strongly suggested packages, but
close enough since pretty much everyone puts it in)
--
                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk

Re: OS X Install

От
Joel
Дата:
> ... I see a mysql user
> also. I know I did not create or install that :).
> ...

That has in there by default since sometime before Jaguar. It's not used
unless you install mysql, but mysql became part of the default install
in the server versions somewhere after 10.0 beta, which might have
something to do with it.

--
Joel <rees@ddcom.co.jp>


Re: OS X Install

От
Jim Crate
Дата:
I'm a little late to the party, but figured I could at least offer some info for
the archives.

If you don't know the user's password, and you have admin access, then it really
doesn't matter.  In fact, I set any special users (pgsql, mailman, etc.) up so
that they *cannot* be logged into normally.  Instead, do this:

sudo su - pgsql

and then all you need to know is your own password.

You can use niutil to create and delete users and groups.  Reading the man page
and exploring a bit using the -list and -read options will be very informative.

Here is a script I use to create a user. Execute it with sudo.



niutil -create . /groups/pgsql
niutil -createprop . /groups/pgsql gid 5001

niutil -create . /users/pgsql
niutil -createprop . /users/pgsql uid 5001
niutil -createprop . /users/pgsql gid 5001
niutil -createprop . /users/pgsql passwd \*
niutil -createprop . /users/pgsql home /Users/pgsql
niutil -createprop . /users/pgsql shell /bin/tcsh


gid and uid can be set to some non-conflicting number of your choice.  I believe
that numbers over 5000 do not show up in System Preferences or the login window.

--
Jim Crate
Deep Sky Technologies, Inc.

Re: OS X Install

От
Joel
Дата:
(A little back-seat driving from me below:)

On Thu,  4 Nov 2004 10:11:18 -0500
Jim Crate <jcrate@deepskytech.com> favored us with

> I'm a little late to the party, but figured I could at least offer some info for
> the archives.
>
> If you don't know the user's password, and you have admin access, then it really
> doesn't matter. In fact, I set any special users (pgsql, mailman, etc.) up so
> that they *cannot* be logged into normally.  Instead, do this:
>
> sudo su - pgsql

This gives you a shell under the pgsql user, which can be convenient,
but anything you do after getting the shell is not logged. Logging is
convenient in a different way.

Also, if you tighten up the configuration a bit, su will refuse to log a
user with no default shell or home directory.

I prefer to sudo each command, for the logging:

    sudo -u pgsql <command>

If you don't like all that extra typing, command line editing is on by
default in the Mac OS X shell window, so you can just hit the up arrow,
erase the previous command, and type the next one.

> and then all you need to know is your own password.
>
> You can use niutil to create and delete users and groups.

And you can even use the netinfo GUI utility. (heh. I sudo each command,
but I use the GUI netinfo to save typing. I'm strange, I guess.)

> Reading the man page
> and exploring a bit using the -list and -read options will be very informative.
>
> Here is a script I use to create a user. Execute it with sudo.
>
>
>
> niutil -create . /groups/pgsql
> niutil -createprop . /groups/pgsql gid 5001
>
> niutil -create . /users/pgsql
> niutil -createprop . /users/pgsql uid 5001
> niutil -createprop . /users/pgsql gid 5001
> niutil -createprop . /users/pgsql passwd \*
> niutil -createprop . /users/pgsql home /Users/pgsql
> niutil -createprop . /users/pgsql shell /bin/tcsh
>
>
> gid and uid can be set to some non-conflicting number of your choice.  I believe
> that numbers over 5000 do not show up in System Preferences or the login window.
>
> --
> Jim Crate
> Deep Sky Technologies, Inc.

--
Joel <rees@ddcom.co.jp>