[Bucardo-general] authentication error from DBI-connect with .pgpass

Asier Azaceta asier.azaceta at techabout.es
Thu Jan 16 09:08:26 UTC 2014


Hi,
My first here, so hello! ;-)

I'm trying to set up bucardo in multi-master mode with postgres 9.2 on
ubuntu. I'm trying the packaged version in 'trusty' which is 4.99.10-1
As I was going through the installation process I've been stop by what
could be a 'bug'. I've tried searching the mailing list for answers,
although I've found nothing defined enough to qualify as a solution.

The problem is that running a simply 'bucardo show all' command as the
bucardo user breaks with an authorization error from DBI at line 267 of
/usr/bin/bucardo, although the passwd is in the user's .pgpass and psql is
able to connect with no problems.
I'm not keen on passing the password as an environment variable or command
line argument, which look like alternatives. (CLI arg works)
After some googling I've found a workaround, although involves 'touching'
the code. If you just change the DBI->connect line from supplying the
password, to supplying 'undef'. That's changing
$bcargs->{dbpass}
for
undef
Then the script will fall into searching for a passwd according to the
standard method for postgres (one of them being looking into .pgpass).

This small change is working for me, though I suspects it breaks the
parameters and environment vbles options. I'm not an expert at perl at all,
so maybe someone can find a better solution for upcoming versions.
In any case, if you feel I'm wrong and there's a better solution already in
places, please, let me know.

Best regards,

Asier Azaceta
CTO
Techabout S.L.L.
Avda de las Universidades 24, ESIDE 4ª Planta
48007, Bilbao, Spain
http://www.techabout.es/

*Think Green. Keep it on the screen.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20140116/5a2cfa34/attachment.html>


More information about the Bucardo-general mailing list