Re: [BackupPC-users] Backup PC smbclient and passwords
Hi again Jason, Thanks for your reply. With your workaround do you have the problem of the generated tar file's name being corrupt? When my backup completed (using your method), I then checked the XferLOG in backuppc: Running: /usr/bin/smbclient-backuppc-hack matt-pc\\C\$ -U backuppc -E -N -d 1 -c tarmode\ full -Tc - /Documents\ and\ Settings codedb full backup started for share C$ Xfer PIDs are now 17388,17387 Domain=[PROFACTOR] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager] tarmode is now full, system, hidden, noreset, verbose [a few NT_STATUS_SHARING_VIOLATIONS on registry files etc] tar: dumped 70033 files and directories Total bytes written: 7595769344 tarExtract: \\matt-pc\C$SECRET-Ubackuppc-E-N-d1-ctarmode full-Tc-/Documents and Settingscodedb./Documents and : checksum error at create 0 0/0 0 \\matt-pc\C$1gn5bULp-Ubackuppc-E-N-d1-ctarmode full-Tc-/Documents and Settingscodedb./Documents and tarExtract: : checksum error at tarExtract: Can't open /backup/backuppc/pc/matt-pc/new/fC$/ for empty output create 0 0/0 0 . tarExtract: : checksum error at [followed by a large sequence of checksum errors] tarExtract: Can't open /backup/backuppc/pc/matt-pc/new/fC$/ for empty output create 0 0/0 0 . tarExtract: Done: 23 errors, 12 filesExist, 0 sizeExist, 45056 sizeExistComp, 12 filesTotal, 0 sizeTotal where 'SECRET' is my password. The log file reckons: 2007-05-03 09:49:11 full backup started for share C$ 2007-05-03 10:11:12 full backup 0 complete, 56597 files, 7579291420 bytes, 53 xferErrs ( bad files, bad shares, 53 other) but if I browse the backups I only have a single folder called \\matt-pc\C$SECRETp-Ubackuppc-E-N-d1-ctarmode full-Tc- and within that a folder called Documents and Settingscodedb. and then inside that a single file called Documents and . So now it would appear the tar is ok but somehow backuppc's extraction isn't working. I wonder if the unusual name embedded in the tar file is in some way related to this issue. Do you (or indee anyone) have any ideas on this? Once again thanks for your reply, Matt Jason M. Kusar wrote: I had the same problem with my server (CentOS 5). As a workaround until Red Hat fixes the issue, this perl script will solve the problem: #!/usr/bin/perl $service = shift @ARGV; unshift @ARGV, $ENV{PASSWD}; unshift @ARGV, $service; exec /usr/bin/smbclient, @ARGV; Just put it in /usr/bin and have backuppc point to it instead of smbclient. It will insert the password from the environment into the command string. There probably should be some checking of it to guard against injection attacks, but since I'm the only one with access to the backup server, I didn't put much thought into it. It does fix the problem for now though. --Jason -- /Matt Godbolt ProFactor Software [EMAIL PROTECTED] DD: +44 (0) 20 8150 6956/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/
Re: [BackupPC-users] Backup PC smbclient and passwords
Matt Godbolt wrote: Hi again Jason, Thanks for your reply. With your workaround do you have the problem of the generated tar file's name being corrupt? When my backup completed (using your method), I then checked the XferLOG in backuppc: [snip] Rather unfortunately I've found the problem - it was completely my fault! I had been temporarily debugging Jason's script with a echo $ARGV; line...and forgot to take it out. Hence the tar archive had the parameters prepended to it, which corrupted the archive. Oops! Matt - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/
[BackupPC-users] Backup PC smbclient and passwords
Hi there, I've just installed BackupPC at my company having happily used it at home for some time. In both locations it's used in a mixed OS environment, but at work we've decided to use SMB shares to read from everyone's PCs for ease-of-use reasons. As such we have a backuppc domain user and this has access to everybody's C$ shares. However, backuppc is unable to access the files via smbclient. It gets a NT_STATUS_LOGON_FAILURE. I suspect this is due to a problem with its use of smbclient, or an issue with smbclient itself. (It appears others have a similar issue in http://www.mail-archive.com/backuppc-users@lists.sourceforge.net/msg02333.html) I'm pretty sure I have everything set up right. I've tested this with: % PASSWD=secret smbclient -U backuppc computer-name\\c\$ and this logs me in just fine. This also works: % PASSWD=secret smbclient matt-pc\\C\$ -U backuppc -E -N -d 1 -c tarmode\ full -Tc - (filling up the terminal with gibberish from the tar file). However, things start to go wrong at: % PASSWD=secret smbclient matt-pc\\C\$ -U backuppc -E -N -d 1 -c tarmode\ full -Tc - /path_to_backup At this point I get the NT_STATUS_LOGON_FAILURE. This leads me to suspect that smbclient is using the backup paths /path_to_backup as the password. Indeed, if I add the password at this point in the command-line, it logs in fine. After reading the man pages a bit, I tried putting as the password at this point ie: % PASSWD=secret smbclient matt-pc\\C\$ -U backuppc -E -N -d 1 -c tarmode\ full -Tc - /path_to_backup but this still fails to log in. So, short of hardcoding the password into the smbclient execution string itself (I'd rather not!), is there any way around this issue? I'm using BackupPC v3.0.0 and smbclient 3.0.23c-2.el5.2 (from Red Hat Enterprise Linux 5). Many thanks in advance for any clues on this - I've tried googling and searching the mailing lists, but I wasn't ever able to find a final solution to this issue. Regards, Matt -- /Matt Godbolt ProFactor Software / - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/
Re: [BackupPC-users] Backup PC smbclient and passwords
Matt Godbolt wrote: Hi there, I've just installed BackupPC at my company having happily used it at home for some time. In both locations it's used in a mixed OS environment, but at work we've decided to use SMB shares to read from everyone's PCs for ease-of-use reasons. As such we have a backuppc domain user and this has access to everybody's C$ shares. [snip] After a little more investigation, it would appear this is a known problem. According to: https://bugzilla.samba.org/show_bug.cgi?id=3974 this is fixed in 3.0.23c However, it's also referenced by https://bugzilla.samba.org/show_bug.cgi?id=2051 and https://bugzilla.samba.org/show_bug.cgi?id=3954 with the implication that a patch applied by Red Hat might have reintroduced the issue. Sorry for the confusion, I'll go chase Red Hat on this samba issue. Regards, Matt - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/backuppc-users http://backuppc.sourceforge.net/