>>>>> On Wed, 08 Nov 2006 09:37:26 -0800, G Armour Van Horn said:
> 
> Martin Simmons wrote:
> 
> >>>>>>On Wed, 08 Nov 2006 00:16:09 -0800, G Armour Van Horn said:
> >>>>>>            
> >>>>>>
> >>Scott, I hope you don't mind but I'm taking this back to the list, I 
> >>really would like as many folks looking at this as possible, and if we 
> >>figure it out the solution should end up in the list archive.
> >>
> >>Scott Simpson wrote:
> >>
> >>    
> >>
> >>>On Tuesday 07 November 2006 11:58 am, you wrote:
> >>> 
> >>>
> >>>      
> >>>
> >>>>All of that is working perfectly with only one exception. When I did the
> >>>>"psql bacula" the first line in response was
> >>>>   could not change directory to "/root"
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>What is the home directory set to for postgres in /etc/passwd? Mine 
> >>>is /var/lib/postgresql (on Ubuntu).
> >>>.
> >>> 
> >>>
> >>>      
> >>>
> >>[EMAIL PROTECTED] ~]# cat /etc/passwd | grep postg
> >>postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash
> >>
> >>And, since I've seen "/root" pop up in several of the errors:
> >>
> >>[EMAIL PROTECTED] ~]# cat /etc/passwd | grep root
> >>root:x:0:0:root:/root:/bin/bash
> >>operator:x:11:0:operator:/root:/sbin/nologin
> >>
> >>If I try to start the director I get this:
> >>
> >>[EMAIL PROTECTED] bacula]# ./bacula-ctl-dir start
> >>Starting the Bacula Director daemon
> >>07-Nov 23:52 bacula-dir:  Fatal error: Could not open Catalog 
> >>"MyCatalog", database "bacula".
> >>07-Nov 23:52 bacula-dir:  Fatal error: postgresql.c:168 Unable to 
> >>connect to PostgreSQL server.
> >>Database=bacula User=bacula
> >>It is probably not running or your password is incorrect.
> >>07-Nov 23:52 bacula-dir ERROR TERMINATION
> >>Please correct configuration file: /etc/bacula/bacula-dir.conf
> >>
> >>Note that it's trying to run as bacula. Earlier you suggested I do "psql 
> >>bacula" as user postgresql, but I see here that it's not trying to run 
> >>as user postgresql. So I tried to do that from that account, but "su 
> >>bacula" was disallowed as the user doesn't have shell access:
> >>
> >>[EMAIL PROTECTED] bacula]# cat /etc/passwd | grep bacula
> >>bacula:x:100:6:Bacula:/var/bacula:/sbin/nologin
> >>
> >>However, switching the bacula shell from /sbin/nologin to /bin/bash (the 
> >>same as user postgresql) did not change the behavior, so I restored it 
> >>to how the RPMs created it. it did allow me to do the "psql bacula" 
> >>wtihout error, but the director still failed with exactly the same message.
> >>
> >>In bacula-dir.conf is the declaration
> >>    dbname = bacula; user = bacula; password = ""
> >>I used the PostgreSQL admin section of Webmin to set a password for the 
> >>user and entered it in bacula-dir.conf, but there was no change in behavior.
> >>
> >>Any other suggestions?
> >>    
> >>
> >
> >Firstly, note that PostgreSQL user names are not the same as Linux login 
> >names
> >(both have to set up independently).  Confusion arises because the psql
> >command uses the current Linux login name as the PostgreSQL user name by
> >default.
> >
> >Do any of these commands works?
> >
> >psql -U bacula -d bacula
> >psql -U bacula -d bacula --password
> >psql -U postgresql -d bacula
> >psql -U postgresql -d bacula --password
> >  
> >
> All of those fail like this:
> [EMAIL PROTECTED] bacula]# psql -U bacula -d bacula
> psql: FATAL: Ident authentication failed for user "bacula"
> 
> I did mess with the password for user bacula last night, the Webmin
> console reports that "Requires password?" is set to No for user
> postgres. There is no user postgresql, but the error was still the same.
> 
> However, if I "su postgres" and immediately do "psql bacula" it happily
> drops to the terminal.

Ah, OK, so your main PostgreSQL user is called postgres.  I think the
Director's problem is related to the problem you get with

psql -U bacula -d bacula

Check your pg_hba.conf file.  It probably lists "ident sameuser" as the
"method" and you'll need to change this to something else.  You can use
"trust" if you don't care about security.


> >One of these should produce the PostgreSQL interactive terminal.
> >
> >If you get this, what do these commands print?
> >
> >\dt
> >\dp
> >\du
> >select * from version;
> >  
> >
> bacula=# \dt
> List of relations
> ...snipped...

The database structure looks OK to me (though I have tables owned by the
postgres user, not root).

__Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to