After searching through all the wiki docs and discussions here on the forums, I need some help in setting up an environment on CentOS. I'm having some problems installing booktype, specifically getting it to work with the postgresql install. I've followed the instructions up to the point where it's asking for:
I've set the conf file for postgres to even accept full trust for the booktype user and still it kicks back with the ident auth failed for booktype. I'm not primarily a postgres user, but I do use mysql quite a bit.
Here's the pg_hba.conf file:
# 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
local booktype booktype trust
I realize that it says md5 in the manual, but I wanted to see if it would work with trust turned on (meaning password not required, according to the postgres docs) and it still didn't work.
Any help would be greatly appreciated.
Thanks!
Post edited by Michael Garcia at 2013-12-27 15:19:46
Hi Michael, first I would suggest confirming that the booktype database has been created correctly and that the booktype user can access it on the command line.
The error message indicates that ident has failed, but this is not the method you have specified on the final line of pg_hba.conf (md5 or trust). So it one of the lines above, for local connections, that is causing this error. Postgres is using the first matching line and ignoring the line you have added at the end.
Possibly CentOS sets ident for these lines by default, which has to do with the shell user account, whereas Debian/Ubuntu set md5 by default. There is a detailed explanation of this issue at http://www.depesz.com/2007/10/04/ident/
Let us know how you get on! If you have tips for CentOS, we can add these to the Booktype manual.
I'm having the exact same "FATAL: Ident authentication failed for user "booktype" problem running django-admin.py syncdb --noinput on a virgin CentOS 6.5 install.
(mybooktype)[root@Test11 mybooktype]# su - postgres -bash-4.1$ psql psql (8.4.20) Type "help" for help.
postgres=# \du List of roles Role name | Attributes | Member of -----------+-------------+----------- booktype | | {} postgres | Superuser | {} : Create role : Create DB
I don't know postgresql (just googled for commands to verify user and booktype db -- which seems to exist).
I made sure the booktype entry in /var/lib/pgsql/data/pg_hba.conf was the first entry:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# From booktype install instructions: local booktype booktype md5
# "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
As this didn't work, I changed /var/lib/pgsql/data/pg_hba.conf to permit all for both unix sockets and tcp/ip sockets (which the original poster also seems to have done):
# TYPE DATABASE USER CIDR-ADDRESS METHOD
local booktype all trust host booktype all 0.0.0.0/0 trust
That, (and removing the entry altogether) didn't work either. I then tried connecting via psql (with and without forced password):
(mybooktype)[root@Test11 mybooktype]# psql --dbname=booktype --username=booktype -W Password for user booktype: psql: FATAL: Ident authentication failed for user "booktype"
Again, no success. In an act of desperation, I changed the postgres permissions to disable security altogether (note the absence of a booktype definition):
# "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust
This seems to work for (a) logging in with psql from the command line, as well as (b) running the script. Obviously. this does not solve the problem of giving booktype correct permissions, but it allows newbies like me to continue with the installation.
Post edited by Ruedi Aschwanden at 2014-03-29 13:31:04