我已经按照指定创建了我的backend.ldif文件,我正在尝试添加它:
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f backend.ldif
但我得到:
SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 adding new entry "cn=module,cn=config" ldap_add: Other (e.g.,implementation specific) error (80) additional info: <olcModuleLoad> handler exited with 1
完整的LDIF是:
#Load dynamic backend modules dn: cn=module,cn=config objectClass: olcModuleList cn: module olcModulepath: /usr/lib/ldap olcModuleload: back_hdb # Database settings dn: olcDatabase=hdb,cn=config objectClass: olcDatabaseConfig objectClass: olcHdbConfig olcDatabase: {1}hdb olcSuffix: dc=mydomain,dc=us olcDbDirectory: /var/lib/ldap olcRootDN: cn=admin,dc=mydomain,dc=us olcRootPW: dmx512 olcDbConfig: set_cachesize 0 2097152 0 olcDbConfig: set_lk_max_objects 1500 olcDbConfig: set_lk_max_locks 1500 olcDbConfig: set_lk_max_lockers 1500 olcDbIndex: objectClass eq olcLastMod: TRUE olcDbCheckpoint: 512 30 olcAccess: to attrs=userPassword by dn="cn=admin,dc=us" write by anonymous auth by self write by * none olcAccess: to attrs=shadowLastChange by self write by * read olcAccess: to dn.base="" by * read olcAccess: to * by dn="cn=admin,dc=us" write by * read
有关如何排除故障的任何建议?我对LDAP服务器一无所知这是我的第一个.
更新:
我已经开始使用全新的11.04服务器安装.
我做了以下事情:
hostname ldap.mycompany.com nano /etc/hosts (set to ldap.mycompany.com) nano /etc/hostname (set to ldap.mycompany.com) sudo apt-get install slapd ldap-utils
我尝试加载第一个架构:
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
我明白了:
SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=auth SASL SSF: 0 adding new entry "cn=cosine,cn=schema,implementation specific) error (80) additional info: olcAttributeTypes: Duplicate attributeType: "0.9.2342.19200300.100.1.2"
我尝试了下面建议的命令:
root@ldap:~# cat /etc/ldap/slapd.d/cn\=config/cn\=module\{0\}.ldif dn: cn=module{0} objectClass: olcModuleList cn: module{0} olcModulePath: /usr/lib/ldap olcModuleLoad: {0}back_hdb structuralObjectClass: olcModuleList entryUUID: 3bedbe64-e4b2-1030-832a-17900c7b3644 creatorsName: cn=config createTimestamp: 20120206020131Z entryCSN: 20120206020131.785958Z#000000#000#000000 modifiersName: cn=config modifyTimestamp: 20120206020131Z
但是这次没有关于模块,它抱怨“Duplicate attributeType”.
所以我需要一个命令,显示“显示已加载的属性类型”,以查看“余弦”是否已在列表中?
好的,我要假设:
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
是不必要的,因为他们都产生相同的错误.
所以我继续添加〜/ backend.ldif.我从顶部删除了load modeule行,因为模块似乎已经加载了.
现在当我尝试添加:
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f backend.ldif
我明白了:
SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=auth SASL SSF: 0 adding new entry "olcDatabase=hdb,implementation specific) error (80) additional info: <olcSuffix> namingContext "dc=mycompany,dc=us" already served by a preceding hdb database