Monday, December 16, 2013

bandwidthd with Postgres giving FATAL: Ident authentication failed for user “MY_USERNAME”

If you’re trying to setup bandwidthd with PostgreSQL, you may run into the following error: bandwidthd: Connection to database ‘user = USER dbname = bandwidthd host = localhost password = PASSWORD’ failed: FATAL:  Ident authentication failed for user “USER”. This is most likely a problem with PostgreSQL and not bandwidthd itself.
Here’s how to fix it (on CentOS/RHEL):
vim /var/lib/pgsql/9.2/data/pg_hba.conf
Find the line:
host    all         all         127.0.0.1/32          ident sameuser
Change the last part to md5. Your line should look like this:
host    all         all         127.0.0.1/32          md5
Restart PostgreSQL
/etc/init.d/postgresql-9.2 restart
Et voila! You should now be logging to PostgreSQL

No comments:

Post a Comment