473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

OS X Install

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

Nov 23 '05 #1
16 2291

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


Nov 23 '05 #2
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 <na****@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
na****@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
Nov 23 '05 #3

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

Nov 23 '05 #4
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:

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

Nov 23 '05 #5
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

Nov 23 '05 #6

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
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #7
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
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #8
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
da*@sidhe.org have teddy bears and even
teddy bears get drunk
Nov 23 '05 #9
A few comments --

On Fri, 15 Oct 2004 20:09:42 -0400
Nathan Mealey <na****@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 <re**@ddcom.co.jp>
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #10

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
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #11
> 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
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #12

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
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #13
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
da*@sidhe.org have teddy bears and even
teddy bears get drunk

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

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #14
... 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 <re**@ddcom.co.jp>
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #15
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.) upso
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.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #16
(A little back-seat driving from me below:)

On Thu, 4 Nov 2004 10:11:18 -0500
Jim Crate <jc****@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 <re**@ddcom.co.jp>
---------------------------(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

Nov 23 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Yun Guan | last post by:
Hello mysql gurus, I am trying to run perl on mysql database on Red Hat box. I want to install DBI and DBD:mysql using CPAN: perl -MCPAN -e shell cpan>install DBI The above succeeded, but...
1
by: Peter Hartmann | last post by:
How do I influence the platform type during install? Could you look at this and tell me what I'm doing wrong? It's still using information from get_platform instead of using my preference. #...
3
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
12
by: Matt Fielder | last post by:
I tried to install SP1, and it appears to have just stopped somewhere part way through. It was "collecting information" (for a long time, slow progress bar) --- then suddenly it stopped.... no...
5
by: Ajith Menon | last post by:
I have to install .NET framework 3.0. I already have .NET Framework 1.1 installed on my machine. I don't want to remove framework 1.1 since some of the critical applications are using it. While...
3
by: Jason Madison | last post by:
My SP1 install seemed to want to keep repeating the install. I spent 4 hours running the install, then it ran again (I got the message up saying it had finished, then it started again). I didn't...
1
by: Sorin Schwimmer | last post by:
Hi All, After a disaster in which I lost my whole harddrive, I decided to install the newest everything that I use. I put the latest Gentoo Linux, with gcc 4.1.1, installed tcl/tk 8.4.14 and...
1
by: =?Utf-8?B?Qi5BaGxzdGVkdA==?= | last post by:
Hi all, This is something that I have been toying with for about a week now. What I want to achieve is Install a Service with Customised parameters (using InstallUtil.exe) for User Name. Example...
3
by: Jean-Marc Blaise | last post by:
Hi, I've been trying for 2 hours to install in silent mode a DB2 9 runtime client. Why didn't you make this process as simple as for the CLIENT install ? It is not the same setup command, you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.