Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pg_hba.conf file [closed]

Can somebody please post an original copy of an unedited pg_hba.conf file for postgresql, 9.1, on ubuntu. I screwed it up and can't find an original nor in the position to reinstall.Thank you

like image 962
user1233418 Avatar asked May 22 '12 02:05

user1233418


2 Answers

In fact, the only way you can receive this file is when somebody else will run initdb on his machine and send the file to you by email or via some hosting.

The official way is (documentation says):

Client authentication is controlled by a configuration file, which traditionally is named pg_hba.conf and is stored in the database cluster's data directory. A default pg_hba.conf file is installed when the data directory is initialized by initdb. It is possible to place the authentication configuration file elsewhere, however; see the hba_file configuration parameter.

UPDATE: Is this pg_hba.conf (pastebin.com) what you was looking for? It's the file I received right now when installed a PostgreSQL 9.1 on Debian 6.

like image 186
Sergei Danielian Avatar answered Nov 14 '22 11:11

Sergei Danielian


I don't have Ubuntu at hand but in most cases there are three rules (all the rest is just comments). On most distributions the method is set to ident.

# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     ident
# IPv4 local connections:
host    all             all             127.0.0.1/32            ident
# IPv6 local connections:
host    all             all             ::1/128                 ident
like image 25
Eelke Avatar answered Nov 14 '22 09:11

Eelke