From: Craig B. <cba...@us...> - 2004-03-22 08:29:22
|
"Tristan Stahnke" writes: > I'm having a very bizarre issue, and I believe it has something to > do with authentication through SMB with BackupPC. I'm using Samba > 3.0.2a on Mandrake Linux 10, with the patch that was posted here > for multiple entries in the exclusion list. When I do the command > /usr/local/share/backuppc/bin/BackupPC_dump -i -v hostname, it > appears to go about it's job correctly, but then suddenly it pops > up this and drops me back to the prompt: > > --- hostname ping statistics --- > 1 packets transmitted, 1 received, 0% packet loss, time 0ms > rtt min/avg/max/mdev = 16.957/16.957/16.957/0.000 ms > > CheckHostAlive: returning 16.9 > dump failed: > [bash]$ > > Now, what's so bizarre, is that if I manually run the samba command > that BackupPC_dump runs, while BackupPC_dump is running (i.e. it > get's the timestamp from the actions of BackupPC_dump -i), and leave > that samba command running, and THEN start another instance of > BackupPC_dump -i -v hostname, the incremental backup completes > without errors. I'm thinking maybe BackupPC isn't correctly passing > on the password to the host, and the host is rejecting me for some > reason. When I run the samba command from the command line, I > include the password in the -U expression (i.e. username%password) > and that seems to work with authentication fine... But when I do > the same thing in the config.pl username field, it still fails. > > I have put BPC_SMB_PASSWD in the /etc/init.d/backuppc, and I also > have it in the login information in the host specific config.pl; it > doesn't appear to solve the issue though. > > By the way, the errors Xferlog just shows this: > running: /usr/bin/smbclient \\\\hostname\\C\$ -U username -E -N -d 1 -c tarmode\ full -TcNrX /home/backuppc/backups/pc/hostname/timeStamp.level0 - \\RECYCLER \\pagefile.sys \\hiberfil.sys \\Program\ Files \\WINDOWS \\VIRTPART.DAT \\tmp2 \\temp2 \\temp \\System\ Volume\ Information > Xfer PIDs are now 12529,12528 > [ skipped 1 lines ] > tar_re_search set > tarExtract: Done: 0 errors, 407 filesExist, 913478 sizeExist, 750314 sizeExistComp, 1306 filesTotal, 201099733 sizeTotal > > Any help would be appreciated. Is there a way to increase the > debug level for BackupPC_dump -i -v with samba so I can see what > it's failing on? I can't explain this behavior. The -d option sets the debug level for smbclient. You can change it via $Conf{SmbClientFullCmd} or $Conf{SmbClientIncrCmd}. BackupPC uses the PASSWD environment variable to set the password for smbclient. The value it uses is either BPC_SMB_PASSWD or the setting of $Conf{SmbSharePasswd}. Setting it via the command line is obviously undesirable since it will be visible to people running ps. But I do recall that for smbclient 3.x the environment variable password support was changed. It still works correclty for me (at least the last version I tested - probably 3.0.1). If your BackupPC server is not used by regular users (so people can't see process arguments with ps), you could try the -U username%password form by setting $Conf{SmbClientFullCmd} and $Conf{SmbClientIncrCmd} appropriately. Craig |