From: Kern S. <ke...@si...> - 2005-11-13 16:04:18
|
On Sunday 13 November 2005 16:53, Mathieu Arnold wrote: > +-le 13/11/2005 16:51 +0100, Kern Sibbald =E9crivait : > | On Sunday 13 November 2005 16:47, Kern Sibbald wrote: > |> On Sunday 13 November 2005 16:26, Mathieu Arnold wrote: > |> > +-le 13/11/2005 16:05 +0100, Kern Sibbald =E9crivait : > |> > | Hello, > |> > | > |> > | I'm trying to get PostgreSQL working with Bacula, something I have > |> > | never done before, so that I can run regression scripts against it > |> > | before each release as I do with SQLite and MySQL. > |> > | > |> > | I have PostgreSQL installed on my system, the bacula userid is > |> > | installed correctly in the PostgreSQL database, and bacula has > |> > | permission to create tables. > |> > | > |> > | Building the Bacula tables, granting privileges, and all that seems > |> > | to work. However, when the Director attempts to connect to > |> > | PostgreSQL, it fails. I am using the following: > |> > | > |> > |# Generic catalog service > |> > | Catalog { > |> > | Name =3D MyCatalog > |> > | dbname =3D bacula; user =3D bacula; password =3D "" > |> > | } > |> > | > |> > | as the resource, and I get the following failure from Bacula: > |> > | > |> > | 13-Nov 15:57 bacula-dir: Fatal error: Could not open database > |> > | "bacula". 13-Nov 15:57 bacula-dir: Fatal error: postgresql.c:168 > |> > | Unable to connect to PostgreSQL server. > |> > | Database=3Dbacula User=3Dbacula > |> > | It is probably not running or your password is incorrect. > |> > | > |> > | Now, that would imply to me that there is no default method of > |> > | connecting from a program to the server, or that our driver doesn= 't > |> > | attempt to connect by some standard default method. > |> > | > |> > | Can anyone help with this? > |> > > |> > I have the exact same Catalog definition, what does : > |> > > |> > psql bacula bacula > |> > |> Hmm. I didn't try that. I get: > |> > |> psql: FATAL: Ident authentication failed for user "bacula" > |> > |> This surprises me because I did > |> > |> CREATE USER bacula createdb; > |> > |> Does it require me to have a password? or to specifically create it > |> with a blank password? > | > | Hmmm. It doesn't require that the userid also be a Unix login does it? > > Well, it seems that your postgresql is configured to try ident on the > connection so that it can only be used from the same user. locate your > pg_hba.conf and change the line : > > local all all ident > to : > local all all trust Thanks! That did the trick. =2D-=20 Best regards, Kern ("> /\ V_V |