Cannot initialize postgres after new install

Hi, trying to replicate a production server. When it came to starting postgresql for first time, postgres can't start:

Code:
# /usr/local/etc/rc.d/postgresql initdb
su: unknown class: postgres

Thanks for any help.
 
Your production server probably has a login.conf(5) class defined for the postgres user and it doesn't exist on the new server. It's not something that's defined or configured when installing PostgreSQL and has been added afterwards.
 
Hi SirDice, you were right on. Added postgres to
Code:
/etc/login.conf
and ran
Code:
cap_mkdb /etc/login.conf

Reran #
Code:
/usr/local/etc/rc.d/postgresql initdb
and it worked.
Thank you!
 
Back
Top