samba 4: a new configuration system?

Andrew Tridgell tridge at osdl.org
Thu Jun 23 22:46:37 GMT 2005


Alan,

 >   That's a great idea, and I wish more projects had that kind of tool.

I would not be surprised if ldbedit gets usage outside of Samba. It
still needs a bit of work to be used as a general ldap editor (for
example, it does the fancy SPNEGO/NTLMSSP authentication schemes that
windows uses, but doesn't do plain text ldap binds), but once those
are fixed I can well imagine administrators using it for managing ldap
servers that have nothing to do with Samba.

 >   One question, though.  I haven't looked, but is it possible to dump
 > the ldb to a text file, and then import that text file back into the
 > ldb?  That would allow other scripts to root through the DB via text,
 > and would also give admins a "warm and fuzzy" feeling that the DB
 > could be backed up in a format humans can understand.

yes, the import/export format is ldif. 

ldbedit does a little more than just import/export though, and perhaps
the additional functionality should be exposed in a tool. The main
extra thing it does is a "ldap diff", which works out what you changed
in the editor, and forms a ldif changeset to apply to the server. We
could have a "ldbdiff" tool that exposes that functionality so you
could do:

  ldbsearch '(some=expression)' > a.ldif
  run_my_script.sh a.ldif > b.ldif
  ldbdiff a.ldif b.ldif > changes.ldif
  ldbmodify changes.ldif

you could in fact do that now by setting your 'editor' in ldbedit to
run_my_script.sh, but perhaps it would be neater to split it out.

Cheers, Tridge


More information about the samba-technical mailing list