Quantcast
Channel: Open Data - identification
Viewing all articles
Browse latest Browse all 3

Using PostgreSQL (psql) - getting past the immediate authentication failure

0
0
Searched words: 
postgresql initial password, psql first account, psql: FATAL: Ident authentication failed for user

How in the world aren't there very clear instructions for getting started with PostgreSQL after apt-get install postgresql?

UPDATE: Doing this the right way

Read the documentation that Debian (and so Ubuntu) provide, typically in /usr/share/doc/<package-name>

The documentation we need can be read with:
vi /usr/share/doc/postgresql-8.4/README.Debian.gz

2. Get a shell for the database superuser 'postgres'. If your system
has an active root user, use su:

$ su -c "su -s /bin/sh postgres"

If your system uses sudo to get administrative rights, use sudo instead:

joe$ sudo -u postgres sh

3. In this postgres shell, create a database user with the same name as your
Unix login:

$ createuser -DRS joe

Old flailing around left for posterity

sudo vi /etc/postgresql/8.4/main/pg_hba.conf

change these two lines to:

# Database administrative login by UNIX sockets
local   all         all                          trust

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust

and:

sudo /etc/init.d/postgresql restart


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images