# Cannot initialize postgres after new install



## ProServ (Aug 10, 2017)

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


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

Thanks for any help.


----------



## SirDice (Aug 10, 2017)

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.


----------



## ProServ (Aug 10, 2017)

Hi SirDice, you were right on. Added postgres to 
	
	



```
/etc/login.conf
```
 and ran 
	
	



```
cap_mkdb /etc/login.conf
```

Reran # 
	
	



```
/usr/local/etc/rc.d/postgresql initdb
```
 and it worked.
Thank you!


----------

