Jump to: navigation, search

Obsolete:Samba 4 Refactoring ProvisionBackend

Obsolete Documentation

Please note that this content was marked as obsolete. We left the content here for study and archaeological purposes.

Please check our Documentation for a recent list of topics.


Currently the provisioning code for different backends are clumped together in a single Python class. It uses a number of if-then statements to control the path of the code. To improve manageability the code should be refactored into several classes utilizing more object-oriented techniques.

Class Hierarchy

+ LDBBackend
+ ExistingBackend
+ LDAPBackend
  + FDSBackend
  + OpenLDAPBackend


The ProvisionBackend is the base class for all Samba backend classes. It defines some methods that should be overridden by the subclasses:

  • init() - initializing backend
  • start() - starting backend
  • shutdown() - shutting down backend
  • post_setup() - post-setup configuration


The LDBBackend is the default TDB backend.


The ExistingBackend is used with an existing LDAP server.


The LDAPBackend is used with a new LDAP server. It defines a method that should be overridden by the subclasses:

  • provision() - backend specific provisioning steps


The FDSBackend is used with 389 DS server.


The OpenLDAPBackend is used with OpenLDAP server.