在LDAP服务器中设置多个域

我试图在CENTOS 7服务器上从头开始设置LDAP服务器。 我能够正确地安装它,但是当它configuration它时,我有点卡在最初的部分。

事情就是我为此设置的公司有三个域名:

  • example.com
  • example.in
  • example-new.com

我正在学习这个教程 。

如何为单个LDAP服务器设置3个不同的dc

答案取决于你想如何使用LDAP服务器。

  • 如果您希望拥有三个完全独立的LDAP树,则可以使用olcDatabase对象types在cn=configconfiguration中configuration多个数据库。 请注意,如果以这种方式执行此操作,则需要为每个LDAP树设置单独的LDAP连接,并且根本无法在其他域中search对象。
  • 如果你只是想要一个逻辑上的分离,例如每个域有不同的邮件帐户,那么你只需要在树中的适当分支处添加一个交接点。 像ou=example.com,cn=users,dc=example,dc=comou=example.in,cn=users,dc=example,dc=com ,其中每个cn将保存子域的用户。 根据您的需要,您可能会有多个这样的联结点,其他选项可能是cn=groups,dc=example,dc=comcn=sites,dc=example,dc=com 。 这样,您既可以在ou=example.com,cn=users,dc=example,dc=com中search用户,也可以仅查找该域的用户,或者可以在cn=users,dc=example,dc=com全局search更多cn=users,dc=example,dc=com并find所有用户。
  • 第三种方法是拥有多个子树,例如ou=example.com,dc=example,dc=comou=example.in,dc=example,dc=com ,然后为像cn=users,ou=example.com,dc=example,dc=com这样的实际对象提供子容器cn=users,ou=example.com,dc=example,dc=com 。 请注意,尽pipe这种方法提供了更好的分离效果,但通常情况下却效率很低,因为如果要在任何域中查找对象,则必须search整个树。

插图:

  • 变体1:

     dc=example,dc=com cn=users cn=groups ------------------ Complete separation dc=example,dc=in cn=users cn=groups 
  • 变体2

     dc=example,dc=com cn=users <---- Junction point ou=example.com uid=alice uid=bob ou=example.in uid=claire cn=groups <---- Junction point ou=example.com cn=accounting ou=example.in cn=hr 
  • 变体3

     dc=example,dc=com ou=example.com cn=users cn=groups ou=example.in cn=users cn=groups