OpenLDAP:修订间差异
跳到导航
跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(→安裝) |
(→安裝) |
||
第7行: | 第7行: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
另外會安裝常用的工具<code> | 另外會安裝<code>ldap-utils</code>,主要是因為CLI下 常用的工具 不在OpenLDAP內提供,而是透過第三方的方式操作(像是<code>ldapmodify</code>、<code>ldapdelete</code> ) : | ||
<syntaxhighlight lang="shell-session"> | <syntaxhighlight lang="shell-session"> | ||
# apt install ldap-utils | # apt install ldap-utils |
2018年3月30日 (五) 08:04的版本
OpenLDAP是一套LDAP伺服器软体。
安装
由于OpenLDAP 2.4在2007年十月发行,至今只有一直发行minor release,所以通常都可以透过系统的套件装到合理的版本:
# apt install slapd
另外会安装ldap-utils
,主要是因为CLI下常用的工具不在OpenLDAP内提供,而是透过第三方的方式操作(像是ldapmodify
、ldapdelete
):
# apt install ldap-utils
设定
Ubuntu 16.04内的版本预设会使用目录结构设定档(预设读取/etc/ldap/slapd.d/
整个目录),但这跟网路上一般使用单档设定不同(通常会是/etc/ldap/slapd.conf
),所以我们要告知slapd使用档案设定档。
这要修改/etc/default/slapd
的内容,将SLAPD_CONF
参数从空的值改为/etc/ldap/slapd.conf
:
# Default location of the slapd.conf file or slapd.d cn=config directory. If
# empty, use the compiled-in default (/etc/ldap/slapd.d with a fallback to
# /etc/ldap/slapd.conf).
SLAPD_CONF=/etc/ldap/slapd.conf
同时我们要将范本复制过来修改(范本在/usr/share/slapd/slapd.conf
这边),里面有一些变数需要设定:
@BACKEND@
设为mdb
。@SUFFIX@
设为dc=example,dc=com
。@ADMIN@
设为cn=Manager,dc=example,dc=com
。
其中的dc=example,dc=com
为范例,可以依照实际组织设定。
另外因为使用mdb,需要将dbconfig
的参数都删除掉(这些是给BerkeleyDB,也就是bdb使用)。