Bug 245167

Summary: YaST2 Samba module with LDAP adds deprecated dual passdb backend
Product: [openSUSE] openSUSE 10.3 Reporter: Don Vosburg <donald.vosburg>
Component: YaST2Assignee: Lukas Ocilka <locilka>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: joe, kukuk, locilka, samba-maintainers
Version: Alpha 0plus   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Don Vosburg 2007-02-13 20:49:56 UTC
When setting up Samba server to use LDAP, the YaST setup adds the LDAP server correctly in /etc/samba/smb.conf, but incorrectly appends smbpasswd to this line:

passdb backend = ldapsam:ldap://10.233.2.1 smbpasswd


The version of samba (3.0.24-2.3) does NOT allow for multiple passdb backends, and smb subsequently terminates abnormally.

If the 'smbpasswd' is removed from this line, the server behaves as it should.
Comment 1 Lukas Ocilka 2007-02-16 19:10:16 UTC
What about this format?

  passdb backend = ldapsam:ldap://10.233.2.1, smbpasswd

http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/passdb.html
Allows:
  passdb backend = tdbsam, smbpasswd
Comment 2 Don Vosburg 2007-02-16 19:30:04 UTC
No - Please reference this link:

http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ChangeNotes.html#id314632

Passdb Changes

The passdb backend parameter no long accepts multiple passdb backends in a chained configuration. Also be aware that the SQL and XML based passdb modules have been removed in the Samba-3.0.23 release. More information regarding external support for a SQL passdb module can be found on the pdbsql web site. 
Comment 3 Lukas Ocilka 2007-02-16 21:58:28 UTC
Thanks for that link, Donald.
Comment 4 Lukas Ocilka 2007-02-19 08:33:00 UTC
Thorsten, Joe: It seems that there is some change in samba that is not backward compatible (SLE10 -> SLE10 SP1).

--- cut ---
The passdb backend parameter no long accepts multiple passdb backends in a chained configuration. Also be aware that the SQL and XML based passdb modules have been removed in the Samba-3.0.23 release.
--- cut ---

We use that for LDAP/smbpasswd.
>> passdb backend = ldapsam:ldap://10.233.2.1 smbpasswd <<

Configurations written by YaST in SLES10 no longer work in SLES10 SP1 because of this change. Should I fix that by writing just the fist "passdb backend"? But what about upgrade/update? This might escalate in critical issue if not correctly covered by the package-upgrade process. What about release notes, at least?
Comment 6 Lukas Lipavsky 2007-02-19 12:45:18 UTC
*** Bug 246689 has been marked as a duplicate of this bug. ***
Comment 8 Lars Müller 2007-02-20 16:04:41 UTC
Then we have to go back to the 3.0.22 release.  The single passdb change was introduced with 3.0.23 and published Jul 10 2006.

Going back to 3.0.22 is impossible for some huge customer sites.

Therefore I suggest to parse the setting for any space and terminate the string at the first space.  In addition we're able to inform the user with a debug 0 statement.  We made the same for changed idmap backend names where we had to strip of a leading part IIRC.
Comment 10 Lars Müller 2007-02-21 18:27:33 UTC
We have to be very careful as even a valid LDAP URL can include a space to separate two LDAP servers.
Comment 11 Luke Howard 2007-02-23 04:56:36 UTC
Just wanted to check - this isn't related to Aquila is it?
Comment 12 Lars Müller 2007-02-23 10:43:59 UTC
Luke: As long as Aquila doesn't use more than one passdb backend this isn't related to Aquila.
Comment 13 Lars Müller 2007-02-23 11:54:47 UTC
http://build.samba.org/?function=diff;tree=samba_3_0;revision=21506 is the fix.

This change set is included to the Novell Samba package subversion.  Please ensure to use at least builds with the subversion revision 1202.

Package sources provided for CODE 10 SP 1.

Regarding Aquila see comment #12.

This Samba change will break an products using more than one passdb backend.
IIRC this is the case for OES 1.
Comment 14 Luke Howard 2007-02-23 14:45:31 UTC
Lars, passdb is not used at all by Aquila.
Comment 16 Forgotten User 5QvPIpj877 2007-04-04 13:38:44 UTC
As Lukes comment #14, this bug does not belong to Domain Services for Windows.  I'm reassigning the bug to Lars.
Comment 17 Lars Müller 2007-04-04 20:14:34 UTC
Anything is done on the Samba side.

I'm not sure regarding the state of YaST samba-server.
Comment 18 Lukas Ocilka 2007-04-04 20:26:41 UTC
YaST Samba Server for SLES10 / SLES10 SP1 will stay the very same as it is now. SLES10 (and more) is only fixed by corrected parsing of the configuration file.

That's why I'm changing the $product to openSUSE 10.3 and adjusting severity. Changed "only one passdb backend" behavior will appear in next openSUSE and SLES11.
Comment 19 Lukas Ocilka 2007-04-11 13:46:27 UTC
- Changing SambaServer functions to use only one "passdb backend"
  for the configuration (#245167).

Fixed in yast2-samba-server-2.15.5