1

I'm trying to install tentd-admin.

The install fails during this step:

$ DATABASE_URL=postgres://localhost/tent_server bundle exec rake db:migrate

I also tried this:

$ DATABASE_URL=postgres://tent:tent@localhost/tent_server bundle exec rake db:migrate

The error message I got is:

Error: Sequel::DatabaseConnectionError: PG::Error: FATAL:  Ident authentication failed for user "tent"
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/sequel-3.43.0/lib/sequel/adapters/postgres.rb:208:in `initialize'

My Postgres setup looks like:

$ cat ~/.pgpass
localhost:5432:tent_server:tent:tent

postgres=# CREATE USER tent WITH password 'tent';
CREATE ROLE

postgres=# CREATE DATABASE tent_server with OWNER tent;
CREATE DATABASE
Greg
  • 167
  • 4
brakertech
  • 255
  • 6
  • 11

1 Answers1

4

Problem

FATAL: Ident authentication failed for user "tent"
Postgres is trying to use ident authentication, and it's not working as expected.

Solution

  1. Read the Postgres manual, specifically the section on pg_hba.conf and the section on ident authentication.
  2. Either of the following
    • Realize ident authentication is not what you want and configure something more appropriate.
    • Fix your ident user mapping and/or your identd daemon to work as Postgres expects.

Recommendation

ident authentication is pretty lousy (it's client-based security and lying about who you are is trivial for an attacker).
Configure one of the many other authentication methods (with actual security) instead.

Alternatively, connect to a local (unix) socket using trust authentication if you prefer (but note that this has security implications of its own).

voretaq7
  • 79,879
  • 17
  • 130
  • 214