ubuntu 16.04 openldap 配置过程两个疑问,olcIndex和添加证书

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
xylou
帖子: 6
注册时间: 2011-09-03 12:29

ubuntu 16.04 openldap 配置过程两个疑问,olcIndex和添加证书

#1

帖子 xylou » 2017-06-21 0:53

https://help.ubuntu.com/16.04/servergui ... erver.html

我是照着官方文档配置的。数据库选的bdb
第一个:
建Ldif文件:
Create a file, call it uid_index.ldif, with the following contents:

dn: olcDatabase={1}bdb,cn=config
add: olcDbIndex
olcDbIndex: uid eq,pres,sub
Then issue the command:
运行语句:
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f uid_index.ldif

报错:
olcIndex
modify entry "olcDatabase={1}bdb,cn=config"
ldap_modify: Other(e.g.,implementation specific) error(80)
additional info:duplicate index definition for attr "uid"

好像是不能添加多个属性
第二个:

建Ldif文件
Create the file /etc/ssl/certinfo.ldif with the following contents (adjust accordingly):

dn: cn=config
add: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/ssl/certs/cacert.pem
-
add: olcTLSCertificateFile
olcTLSCertificateFile: /etc/ssl/certs/ldap02_slapd_cert.pem
-
add: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/ssl/private/ldap02_slapd_key.pem

之后运行这条语句:
Configure the slapd-config database:

sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f certinfo.ldif


报错:
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "cn=config"
ldap_modify: Other(e.g.,implementation specific) error(80)



求解,谢谢
onlylove
论坛版主
帖子: 5230
注册时间: 2007-01-14 16:23

Re: ubuntu 16.04 openldap 配置过程两个疑问,olcIndex和添加证书

#2

帖子 onlylove » 2017-06-21 1:17

不是很清楚你的需求(如果只是想照着文档做可能帮不上你什么)
大部分需求应该可以通过apache directory studio连接ldap服务器来做,或者安装phpldapadmin,通过webui来管理
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu 16.04 openldap 配置过程两个疑问,olcIndex和添加证书

#3

帖子 poloshiao » 2017-06-21 8:54

https://help.ubuntu.com/16.04/servergui ... erver.html
先詳細參閱
最底下 參考文章連結
Resources
xylou
帖子: 6
注册时间: 2011-09-03 12:29

Re: ubuntu 16.04 openldap 配置过程两个疑问,olcIndex和添加证书

#4

帖子 xylou » 2017-06-21 10:01

poloshiao 写了:https://help.ubuntu.com/16.04/servergui ... erver.html
先詳細參閱
最底下 參考文章連結
Resources
第二个问题是给cn=config 添加属性加不上去
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu 16.04 openldap 配置过程两个疑问,olcIndex和添加证书

#5

帖子 poloshiao » 2017-06-21 15:36

additional info:duplicate index definition for attr "uid"
參閱
https://blog.laimbock.com/2013/02/10/fi ... ment-tips/
Fixes for the OpenLDAP example config and deployment tips
/etc/openldap34/slapd.d: line 1: duplicate index definition for attr “uid”
The solution:
ldap_modify: Other (e.g., implementation specific) error (80)
https://serverfault.com/questions/70482 ... tification
ldap_modify: Other (e.g., implementation specific) error (80)
What am I doing wrong?
回复