[Samba] Migrating: tdb to ldap (Samba Classic)

Rob Thoman emailthomasrob at gmail.com
Sat Mar 31 11:20:56 UTC 2018


We have a Samba 4 PDC with TDB backend. We're now trying to a BDC so we
need to migrate from TDB to LDAP . I've read the Samba documentation which
says using tdb in both servers will cause issues. So the question is how do
we migrate from TDB to LDAP in the PDC. The setup we are going for is each
DC will have LDAP setup. The LDAP servers will then be replicated. Reading
the official samba 3 document I found the existing /var/lib/samba needs to
be cleaned before LDAP is setup. The following is what the document says.

Delete all runtime les from prior Samba operation by executing
root# rm /etc/samba/*tdb
root# rm /var/lib/samba/*tdb
root# rm /var/lib/samba/*dat
root# rm /var/log/samba/*

Now the obvious question is if we do the above, it will wipe all user data
from TDB.  So what do we do? Setup openldap, setup all the ssl, base ldifs.
What is the next step? The options I have read is pdbedit -i tdbsam to -e
ldapsam. But if TDB is wiped how will it populate?  The other option is
that export the /passwd and /group and convert them to ldif using the
"migration tools" .i.e /smbldap-migrate . I think it is called the Idealix

Please help.

Thank you,

More information about the samba mailing list