Bug 447820

Summary: Samba 3.2.0 incompatible for smb backups using BackupPC 3.1.0
Product: [Fedora] Fedora Reporter: Brent <fix>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: gdeschner, jbayes
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-14 16:31:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Failed capture using 3.2.0
none
output of tcpdump using Samba 3.2.0 none

Description Brent 2008-05-21 22:26:59 UTC
Description of problem:  BackupPC is unable to perform smb type of backups using
the shipping version of samba


Version-Release number of selected component (if applicable): 
samba-3.2.0-1.pre3.9.fc9.i386


How reproducible:  Configure the shipping version of backuppc as included by
Fedora 9 and setup a backup using smb of a windows/smb share.  Backups will fail
with an error.


Steps to Reproduce:
1. start backuppc service
2. login into backup via web gui, configure a NT/Vista/XP/smb share to backup
3. start a full backup
4. backup will fail with:  tree connect failed: NT_STATUS_ACCESS_DENIED
  
Actual results:
Backups will fail with "tree connect failed: NT_STATUS_ACCESS_DENIED" 

Expected results:
Backups complete successfully

Additional info: 

Downloading the stable source for samba (3.0.28a) and building it for Fedora 9
will fix the issues with backuppc and samba 3.2.0.  Using the configure
compile-time options used for Fedora and replacing the binaries results in
backups completing successfully.   Here are the configure options used to build
3.0.28a for Fedora 9:

  ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu \
        --target=i386-redhat-linux-gnu \
        --program-prefix= \
        --prefix=/usr \
        --exec-prefix=/usr \
        --bindir=/usr/bin \
        --sbindir=/usr/sbin \
        --sysconfdir=/etc \
        --datadir=/usr/share \
        --includedir=/usr/include \
        --libdir=/usr/lib \
        --libexecdir=/usr/libexec \
        --localstatedir=/var \
        --sharedstatedir=/usr/com \
        --mandir=/usr/share/man \
        --infodir=/usr/share/info \
        --with-dnsupdate \
        --with-acl-support \
        --with-automount \
        --with-libsmbclient \
        --with-mmap \
        --with-pam \
        --with-pam_smbpass \
        --with-quotas \
        --with-syslog \
        --with-utmp \
        --with-vfs \
        --without-smbwrapper \
        --with-lockdir=/var/lib/samba \
        --with-piddir=/var/run \
        --with-mandir=/usr/share/man \
        --with-privatedir=/var/lib/samba/private \
        --with-logfilebase=/var/log/samba \
        --with-libdir=/usr/lib/samba \
        --with-configdir=/etc/samba \
        --with-pammodulesdir=lib/security \
        --with-swatdir=/usr/share/swat \
        --with-shared-modules=idmap_ad,idmap_rid

Comment 1 Guenther Deschner 2008-05-22 14:05:38 UTC
Can you please provide a network trace of the failure (3.2.0) and the success
(3.0.28a) ?

Comment 2 Joe Bayes 2008-06-11 08:09:45 UTC
Created attachment 308899 [details]
Failed capture using 3.2.0

Comment 3 Joe Bayes 2008-06-11 08:11:08 UTC
Since I'm having the same problem, I'll try to provide you with the network
trace. If I did this wrong, and you want something different, please let me know
exactly what it is you want. 

Attached is the failure using 3.2.0


Comment 4 Joe Bayes 2008-06-11 10:26:44 UTC
Can't get 3.0.26a to compile (both the plain vanilla package and the source
rpm)-- I keep getting 
smbd/oplock_linux.c:37: error: conflicting types for 'capget'
/usr/include/sys/capability.h:111: error: previous declaration of 'capget' was here



Comment 5 Guenther Deschner 2008-06-12 08:18:28 UTC
(In reply to comment #3)
> Since I'm having the same problem, I'll try to provide you with the network
> trace. If I did this wrong, and you want something different, please let me know
> exactly what it is you want. 
> 
> Attached is the failure using 3.2.0

Thanks for that. What we need is a dumpfile generated with

tcpdump -i $YOURINTERFACE -s 0 -w dumpfile

though.

> 



Comment 6 Joe Bayes 2008-06-12 08:47:03 UTC
Created attachment 309043 [details]
output of tcpdump using Samba 3.2.0

output of spoo:/home/jbayes# tcpdump -i eth0 -s 0 -w dumpfile

Comment 7 Guenther Deschner 2008-06-25 14:01:12 UTC
You're trying to access \\JANE\C$ anonymously (as the provided creds of
MYGROUP\administrator that come along, either have an invalid password, or that
user is invalid completly on that box).

Can you try to set "client lanman auth = yes" in smb.conf ?

Comment 8 Joe Bayes 2008-06-25 16:51:50 UTC
That should be BAYES\administrator -- perhaps that's part of the problem? I just
changed "workgroup = MYGROUP" to "workgroup = BAYES" in smb.conf, but it didn't
fix anything. I also added "client lanman auth = yes" to the "global" section in
/etc/samba/smb.conf. I also added "-W BAYES" to the SmbClientFullCmd and
SmbClientIncrCmd lines in the GUI, which also didn't fix anything. 

I don't think that the "administrator" user is invalid, or that the password is
invalid, as this was working fine under Fedora 8. Perhaps the upgrade changed a
setting somewhere...

Typing "smbclient //jane/c\$ -U administrator%password" into the command line
works just fine. 


Comment 9 Joe Bayes 2008-08-01 18:48:22 UTC
I think I found the problem, and have a workaround.

PASSWD=<password> /usr/bin/smbclient //jane/C\$ -U Administrator -N
fails
but
PASSWD=<password> /usr/bin/smbclient //jane/C\$ -U Administrator
succeeds. 

So it seems that adding -N to the command line doesn't merely suppress the
password prompt, but causes smbclient to ignore the PASSWD variable as well!

I don't think this was the case with samba-3.0.26a.

So the solution is to remove the "-N" from the SmbClient{Full,Incr,Restore}Cmd
variables. And also, to either restore the old behavior in samba, or document
the new behavior in the smbclient manpage. 


Comment 10 Bug Zapper 2009-06-10 01:04:38 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Joe Bayes 2009-06-10 15:22:11 UTC
Bug still exists in Fedora 10 (BackupPC 3.1.0, samba 3.2.11), probably in Fedora 11 as well. 

Just to be clear, the fix is:

1) Remove "-N" from all smbclient commands in BackupPC's config.pl
2) Change the smbclient manpage to say,

-N  Causes smbclient to use no password when accessing the service. Any password in the command line or in the $PASSWD variable will be silently ignored. The user will not be prompted for a password.

Bugzilla won't let me change the "version" field of this bug, but "version" should be changed to 10.

Comment 12 Bug Zapper 2009-07-14 16:31:19 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Joe Bayes 2009-12-04 01:10:58 UTC
This bug is still present in Fedora 12. 

The language of the smbclient manpage has been changed, it is now confusing and overly wordy, but at least it's technically correct. 

The "-N" still needs to be removed from all smbclient commands in BackupPC's config.pl. 

And this bug should be reopened with "version" field set to 12, but Bugzilla won't let me.