我有一台安装了 openLDAP 的 Mac(使用 Macports)。我已经启动了系统并且能够创建对象。我在 slapd.conf 中配置的唯一模式是 core.schema。
我正在寻找添加 nis.schema,但是当我尝试此命令时,该slapd -d3
命令对我不起作用。具体来说,它说:
5b994529 @(#) $OpenLDAP: slapd 2.4.28 (Oct 14 2016 16:25:43) $
[email protected]:/Library/Caches/com.apple.xbs/Binaries/OpenLDAP/OpenLDAP-523.30.2~39/TempContent/Objects/servers/slapd
5b994529 daemon: SLAP_SOCK_INIT: dtblsize=256
5b994529 daemon_init: listen on ldap:///
5b994529 daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap:///)
5b994529 daemon: listener initialized ldap:///
5b994529 daemon_init: 2 listeners opened
5b994529 daemon_init: [0]DNSServiceRegister
ldap_create
5b994529 slapd init: initiated server.
5b994529 int pws_auxprop_init(const sasl_utils_t *, int, int *, sasl_auxprop_plug_t **, const char *): entered5b994529 slap_sasl_init: initialized!
5b994529 bdb_back_initialize: initialize BDB backend
5b994529 bdb_back_initialize: Berkeley DB 4.7.25: (May 15, 2008)
5b994529 hdb_back_initialize: initialize HDB backend
5b994529 hdb_back_initialize: Berkeley DB 4.7.25: (May 15, 2008)
5b994529 ==> OD Locales overlay initialize called
5b994529 ==> translucent_initialize
5b994529 slapd destroy: freeing system resources.
5b994529 slapd stopped.
5b994529 connections_destroy: nothing to destroy.
tlsst_destroy()
我无法找到任何日志来缩小原因范围。如何导入此架构并仍然使 slapd 成功运行?
编辑
我已运行 slapd -d-1 进行额外日志记录。如果需要,我可以提供完整的日志,但我认为以下可能是罪魁祸首:
5b9a54a1 /opt/local/etc/openldap/schema/nis.schema: line 203 (objectclass ( 1.3.6.1.1.1.2.6 NAME 'ipHost' DESC 'Abstraction of a host, an IP device' SUP top AUXILIARY MUST ( cn $ ipHostNumber ) MAY ( l $ description $ manager ) ))
5b9a54a1 /opt/local/etc/openldap/schema/nis.schema: line 203 objectclass: AttributeType not found: "manager"
这是我缺少的依赖吗?
答案1
基于https://github.com/openshift/openldap/blob/master/2.4.41/contrib/config/schema/nis.schema(以及其他参考文献)说:
取决于 core.schema 和 cosine.schema
include
在包含 nis.schema 之前你需要这些:
include /opt/local/etc/openldap/schema/core.schema
include /opt/local/etc/openldap/schema/cosine.schema
# ...
include /opt/local/etc/openldap/schema/nis.schema