首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

OpenLDAP装配及配置

2013-07-20 
OpenLDAP安装及配置# yum list | grep openldap1.2 安装# yum install openldap*?2.配置2.1 创建slapd.con

OpenLDAP安装及配置
# yum list | grep openldap

1.2 安装

# yum install openldap*

?

2.配置

2.1 创建slapd.config配置文件

# cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf

2.2 修改密码

# slappasswd New password: secretRe-enter new password: secret{SSHA}Hy/MUWmZlIXWawK6uZxWprMU0FErCLnU

?2.3 修改slapd.config文件

# vi /etc/openldap/slapd.conf

?????? 修改dc和rootpw,如下:

改前:

database        bdbsuffix          "dc=my-domain,dc=com"checkpoint      1024 15rootdn          "cn=Manager,dc=my-domain,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

?

改后:

database        bdbsuffix          "dc=my-domain,dc=com"checkpoint      1024 15rootdn          "cn=Manager,dc=my-domain,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                secretrootpw                {SSHA}Hy/MUWmZlIXWawK6uZxWprMU0FErCLnU

?2.4 重新生成/etc/openldap/slapd.d目录

# rm -rf slapd.d/*

?

# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.dbdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2).Expect poor performance for suffix "dc=my-domain,dc=com".bdb_db_open: database "dc=my-domain,dc=com": db_open(/var/lib/ldap/id2entry.bdb) failed: No such file or directory (2).backend_startup_one (type=bdb, suffix="dc=my-domain,dc=com"): bi_db_open failed! (2)slap_startup failed (test would succeed using the -u switch)

?2.5 修改/etc/openldap/slapd.d/目录权限

# chown ldap:ldap -R /etc/openldap/slapd.d

?2.6 修改/var/lib/ldap/目录权限

# chown ldap:ldap -R /var/lib/ldap/

?

3. 启动slapd服务

# /etc/init.d/slapd startln: creating hard link `/var/run/slapd.pid': File exists   [  OK  ]

?

# telnet localhost 389Trying ::1...Connected to localhost.Escape character is '^]'.

?

# ldapsearch -x# extended LDIF## LDAPv3# base <> (default) with scope subtree# filter: (objectclass=*)# requesting: ALL## search resultsearch: 2result: 32 No such object

?

?未完待续...

热点排行