[plug] Debian Etch + Postgresql-8.1IDENT error

Denis Brown dsbrown at cyllene.uwa.edu.au
Wed Aug 27 13:39:39 WST 2008


Hello PLUG list members,

Using Debian Etch for i386
target:~# aptitude install Postgresql-8.1		no errors
target:~# aptitude update ; aptitude upgrade	no errors

su - postgres
postgres at target:~$ createdb test1
CREATE DATABASE
postgres at target:~$ psql test1
Welcome to psql 8.1 blah, blah, blah		so far so good

BUT...

postgres at target:~$ exit
target:~# psql -U postgres test1
psql: FATAL:  Ident authentication failed for user "postgres"

And the same applies to other system users who have also been created as 
postgres users and have been granted access to the test1 database, or 
indeed to databases created by themselves.
psql: FATAL:  Ident authentication failed for user <whoever>

If other users are doing the psql <somedatabase> from within their own 
accounts, no worries: so in some respect the ident mechanism is working but 
it *should* work, I would have thought, from any account to any other using 
the -U command line option.   E.g. one is developing something and needs to 
use the postgres account to achieve a higher-end task; using the -U 
postgres option should enable such access without having to (temporarily) 
su into the postgres account.

With the default installation system users who are also Postgresql users 
*should* be able to authenticate using IDENT since this is the way the 
Debian package maintainers have things configured.   For example in 
/etc/postgresql/pg_hba.conf we see
"local all postgres ident sameuser"   to which can be added...
"local all all ident sameuser"

Changing  the "ident sameuser" part to "trust" (and restarting postgres) 
makes it function but I wonder why I should need to do this given that the 
good Debian folks have set it up and presumably have tested it with the 
config files as supplied?   Am I misinterpreting the way ident is supposed 
to work?

Admittedly a small amount of digging thus far but I've not found any 
information - other than the suggestions to change to "trust" - on this matter.

Regards,
Denis





More information about the plug mailing list