比较两个 LDAP 服务器的内容

Compare the contents of two LDAP servers

我继承了两个似乎包含相同信息的 LDAP 服务器。我的目标是确定是否是这种情况。我可以使用 slapcat 输出两个服务器的 ldif,但是我无法使用 diff 直接比较这些文件,因为这些项目是以不同的顺序进行 slapcat。

这些文件可以重新排序以便进行比较吗?

我无法为此使用 ldapsearch,因为服务器将搜索限制为 500 条记录,而我有超过 30,000 条记录。

ldapsearch supports the simple paged results control to overcome the (default=500) sizelimit. There's still a chance you'll hit a limit,但您可以在 slapd 配置文件中轻松补救。

OpenDJ 有一个比较 2 个 LDIF 文件的工具:ldif-diff。 它很慢并且需要一些内存,但我们已经用包含数十万个条目的文件对其进行了测试。