I'm neither a bareos nor postgres expert, so please excuse me if my issue/question is a noob one (although I searched the docs and the web before posting here).
I'm on bareos 12.4.3-1 on Ubuntu Server 12.04.2 LTS with postgres 9.1 as backend. Installation/configuration was done following the guidelines given in the quickstart section on the bareos website. After initial setup and first start of bareos I wanted to check the config files via bareos-dir -t etc.
bareos-dir -t threw an error and complained about the connection to the postgres db "bareos":
root@stokes:~# bareos-dir -t
bareos-dir: dird.c:1088-0 Could not open Catalog "MyCatalog", database "bareos".
bareos-dir: dird.c:1093-0 postgresql.c:238 Unable to connect to PostgreSQL server. Database=bareos User=bareos
Possible causes: SQL server not running; password incorrect; max_connections exceeded.
29-May 12:28 bareos-dir ERROR TERMINATION
Please correct configuration file: bareos-dir.conf
bareos-dir.conf:
...
dbdriver = "postgresql"
dbname = "bareos"
dbuser = "bareos"
dbpassword = ""
...
Apparently password is not set.
Using psql as user portgres: "psql -d bareos --username bareos" complained about failing to peer authenticate.
User bareos is existing but not allowed to log in interactively, seems to be OK:
/etc/shadow
bareos:*:15847:0:99999:7:::
So I altered pg_hba.conf:
# "local" is for Unix domain socket connections only
local bareos bareos trust
local all all peer
to allow bareos a unconditional login to the database. Now bareos-dir -t works as expected.
Is this issue in any way related to my install/configure procedure? I assume that it is because I can't find any bareos related references in the web. Additionally, is the workaround legit?
Many thanks for hints and/or links to learn more about this issue.
Oliver
Thanks a lot!
Cheers