[PATCH] Samba-tool ldapcmp just got better

Zahari Zahariev zahari.zahariev at gmail.com
Wed Jan 5 23:02:48 MST 2011


Hi Jelmer / Tridge,

This is improvement patch to the newest addition to our samba-tool -- 
ldapcmp. Now it would be able to compare not just the whole partition at 
a time but subset of it or any two DNs regardless if their DNs are 
different (only if --scope=Base).

The new options are --base, --base2 and --scope they allow maximum 
flexibility no matter if you work against one DC, two DCs in one domain 
or two DCs in different domains. Their use is of course optional and 
they do not change the current default behavior even a bit. These 
options are supposed to work just as in ldapsearch or ldbsearch so it is 
very easy to adopt.

Here are a couple of examples how you would use the new options:

Example1:
=======
root at darkstar:~/samba-master/source4# ./bin/samba-tool ldapcmp 
10.191.10.91 10.191.10.95 --username=Administrator --password=xxxx123! 
--username2=Administrator --password2=yyyy123@ domain -w --sd --scope=one

Example2:
=======
root at darkstar:~/samba-master/source4# ./bin/samba-tool ldapcmp 
10.191.10.91 10.191.10.95 --username=Administrator --password=xxxxx123! 
--username2=Administrator --password2=yyyyy123@ domain -w 
--base="OU=Hosted,DC=samba91,DC=virtual" --base2="DC=zahari,DC=tk" 
--scope=base

Cheers!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-s4-ldapcmp-Two-new-options-are-added-to-the-tool.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110106/08e59f1b/attachment.ksh>


More information about the samba-technical mailing list