Hi all. Tried to send this mail yesterday and it appeared to bounce.
Apologies if this is a duplicate.

I have a problem with a Client Run Before Job script to backup MySQL
databases which is only occurring when it's called by Bacula.

On the Director I have:

[EMAIL PROTECTED] scripts]# cat /etc/redhat-release; rpm -qa | grep
bacula; ps aux | grep [b]acula
CentOS release 4.3 (Final)
bacula-mysql-1.38.5-4
bacula-mtx-1.38.5-4
bacula   25352  0.0  0.4 39808 2168 ?        Ssl  09:20   0:00
/usr/sbin/bacula-sd -u bacula -g disk -v -c /etc/bacula/bacula-sd.conf
root     25357  0.0  0.3 18132 1848 ?        Ssl  09:20   0:00
/usr/sbin/bacula-fd -u root -g bacula -v -c /etc/bacula/bacula-fd.conf
bacula   25362  0.0  0.5 60420 2988 ?        Ssl  09:20   0:00
/usr/sbin/bacula-dir -u bacula -g bacula -v -c
/etc/bacula/bacula-dir.conf

And the clients are:

[EMAIL PROTECTED] scripts]# cat /etc/redhat-release; rpm -qa | grep
bacula; ps aux | grep [b]acula
CentOS release 4.3 (Final)
bacula-client-1.38.5-4
root     14325  0.0  0.4 38976 2216 ?        Ssl  Mar28  13:31
/usr/sbin/bacula-fd -u root -g bacula -c /etc/bacula/bacula-fd.conf

The script runs mysqlshow to build a list of available databases then
dumps them out to a standard location. It runs fine from the shell as
root on the client hosts themselves, when called during a backup
though I see the following:

06-Jun 10:56 archive: Start Backup JobId 1045, Job=devmon1.2006-06-06_10.56.26
*messages
06-Jun 10:56 devmon1: ClientRunBeforeJob: /usr/bin/mysqlshow: Access
denied for user 'root'@'localhost' (using password: NO)

Again, running mysqlshow on a client from the shell as root works perfectly:

[EMAIL PROTECTED] ~]# mysqlshow
+-----------+
| Databases |
+-----------+
| cacti     |
| mysql     |
| wikidb    |
+-----------+

The mysql database is passworded and that's specifcied in
~root/.my.cnf  which has 600 permissions:

[EMAIL PROTECTED] ~]# cat ~/.my.cnf
[client]
password=correctpasswordhere

It appears mysqlshow checks the .my.cnf when run locally but when
called by Bacula it isn't. If I append -pcorrectpasswordhere to the
mysqlshow in the script then the backup works. I assume that the
Bacula File Daemon runs clients scripts as root?

Can anyone suggest what's going on here?

Will.


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to