openldap 客户端和服务器安装网上一大把,由于openssl以前装过两次,导致各种错误
,evn、makefile各种修改,这里不再细说,说多了全是泪。简单点的可参考:http://www.360doc.com/content/12/0217/23/4165_187488392.shtml
/*增加或者修改配置文件/etc/openldap/slapd.conf*/
#===================================================#
database bdb
suffix "o=mydomain,c=com"
rootdn "cn=root,o=mydomain,c=com"
rootpw 123
directory /var/lib/ldap
#===================================================#
/*完成后在终端执行/etc/init.d/ldap restart。
再执行netstat -anp | grep 389看ldap有无起来*/
/*新建一个test.ldif文件,内容如下:*/
dn: o=mydomain,c=com
objectclass: dcobject
objectclass: organization
o: mydomain
dc: mydomain
dn: cn=mark Xu,o=mydomain,c=com
objectclass: inetorgperson
cn: mark Xu
sn: Xu
mail:123@123.com
/*再在终端执行如下命令,如果成功则会显示adding new entry ...*/
[root@localhost test]# ldapadd -x -D "cn=root,o=mydomain,c=com" -w 123 -f t