2007-02-19

试用openldap

今天在ubuntu下安装(apt-get install slapd)了openldap服务器,因为openldap server在ubuntu下的包名为slapd。

root@gepc188:/etc/ldap# dpkg -s slapd
Package: slapd
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 2432
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Architecture: i386
Source: openldap2.2
Version: 2.2.26-5ubuntu3
Replaces: libldap2, ldap-utils (<< 2.2.23-3)
Provides: ldap-server

安装完成后要使用slappasswd命令来生成加密后的密码,然后在/etc/ldap/slapd.conf文件中添加两行:
rootdn "cn=root,dc=uni-trier,dc=de"
rootpw {SSHA}X5vL372YCCfHW7KJlVzGpwc+iQ6shuEX

这样才能登入数据库。

在创建User Account之前,需创建一个Posix Group组,否则会得到错误提示:
LDAP said: Object class violation
Error number: 0x41 (LDAP_OBJECT_CLASS_VIOLATION)
Description: You tried to perform an operation that would cause an undefined attribute to exist or that would remove a required attribute, given the current list of ObjectClasses. This can also occur if you do not specify a structural objectClass when creating an entry, or if you specify more than one structural objectClass.

这是因为shema定义的缘故,一个用户要求有一个gidNumber值。phpLDAPadmin是一个与phpmyadmin类似的图像化工具,可以简化管理ldap的工作。

没有评论:

发表评论