openldap安装及配置

本文详细介绍了在CentOS环境下安装和配置OpenLDAP服务的过程,包括安装必要软件、复制和修改配置文件、生成管理员密码、调整服务端配置以及确保安全性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ldap server 为CentOS release 6.4
2、cp /usr/share/openldap-servers/slapd.conf.obsolete slapd.conf
      cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/DB_CONFIG
3、slappasswd 生成LDAP管理员的密码并记录下来,如{SSHA}CPlvLh997/PJbKtcw6aelERbVi5Tp9np

4、server配置文件的修改:
    vim /etc/openldap/slapd.conf


# enable server status monitoring (cn=monitor)
database monitor
access to *
        by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read
        by dn.exact="cn=admin,dc=example,dc=com" read
        by * none


#######################################################################
# database definitions
#######################################################################


database        bdb
suffix          "dc=example,dc=com"
checkpoint      1024 15
rootdn          "cn=admin,dc=example,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw                secret
# rootpw                {crypt}ijFYNcSNctBYg
rootpw          {SSHA}CPlvLh997/PJbKtcw6aelERbVi5Tp9np
                                                           
5、生成服务端的配置,
    rm -rf /etc/openldap/slapd.d/*
    slaptest  -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
ldapserver是用自己的用户ldap进行操作的。要将所有的ldap的目录属组进行修改:
    chown -R ldap:ldap /etc/openldap/slapd.d
    chown -R ldap:ldap /var/lib/ldap
#service slapd restart
以上就是ldap服务端的配置。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值