Skip site navigation (1) Skip section navigation (2)

Re: initdb problem

From: "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: initdb problem
Date: 2007-06-20 02:15:24
Message-ID: 007001c7b2e0$dc71ea60$9b0014ac@wbaus090 (view raw or flat)
Thread:
Lists: pgsql-admin
I'm guessing all the problems below are something to do with the 'postgres'
user not having a correct shell login setup. It looks like the home
directory is set to /dev/null which would explain all the "not a directory"
errors.

You'll need to edit the postgers user to have a proper login shell
(/bin/bash maybe?) but I specifically avoid Mac's so that's about all I can
tell you. B)

Cheers,
~p

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of James Herbers
Sent: Wednesday, 20 June 2007 11:11
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] initdb problem

No MAC expert but try this when changing to the postgres user:
    su - postgres
the hyphen gives you an environment for the postgres user.

J. Herbers

Quoting Joe Barwell <jbar(at)es(dot)co(dot)nz>:

> Hello people,
>
> Having installed the universal binary for pg 8.2.4 on my mac
> running 10.3.9, I'm now trying to use the initdb command,
> but keep running into problems. I can't seem to get the
> right syntax. Can anyone suggest where I'm going wrong?
> Here's what terminal shows:
>
> Acorn acorn 1 acorn$ login root
> Password:
> Last login: Thu Jun 14 13:43:54 on ttyp1
> Welcome to Darwin!
> Acorn:~ root# su postgres
> shell-init: could not get current directory: getcwd: cannot
> access parent directories: Permission denied
> su: /dev/null/.bashrc: Not a directory
> Acorn:/var/root postgres$ initdb -D
> /Library/PostgreSQL8/data
> su: initdb: command not found
> Acorn:/var/root postgres$ cd
> chdir: could not get current directory: getcwd: cannot
> access parent directories: Permission denied
> su: cd: /dev/null: Not a directory
> Acorn:/var/root postgres$ cwd
> su: cwd: command not found
> Acorn:/var/root postgres$ /Library/PostgreSQL8/initdb -D
> /Library/PostgreSQL8/data
> su: /Library/PostgreSQL8/initdb: No such file or directory
> Acorn:/var/root postgres$ /Library/PostgreSQL8/bin/initdb -D
> /Library/PostgreSQL8/data
> could not identify current directory: Permission denied
> could not identify current directory: Permission denied
> could not identify current directory: Permission denied
> The program "postgres" is needed by initdb but was not found
> in the
> same directory as "initdb".
> Check your installation.
> Acorn:/var/root postgres$
>
> TIA,
>
> Joe
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>




---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
       message can get through to the mailing list cleanly


*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee.  If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments

In response to

pgsql-admin by date

Next:From: Ira BerdichevskyDate: 2007-06-20 07:09:32
Subject: Problem with PostgreSQL 8.2 on Linux Redhat
Previous:From: Srinivas KotapallyDate: 2007-06-20 01:55:45
Subject: Re: initdb problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group