在 ubuntu 12.04 机器上安装 slapd 后ldapadd
,ldapsearch
我可以看到它获取了我的数据。
问题是目录在哪里?这里是空的:
/var/lib/ldap/
/usr/lib/ldap/
slapd
配置目录/etc/ldap/
仅包含根设置。
我的数据在哪里?或者如何检查/列出我的后端?
我进行以下初始化:
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f db.ldif
db.ldif 是:
# Load modules for database type
dn: cn=module,cn=config
objectclass: olcModuleList
cn: module
olcModuleLoad: back_bdb.la
# Create directory database
dn: olcDatabase=bdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcBdbConfig
olcDatabase: bdb
# Domain name (e.g. home.local)
olcSuffix: dc=home,dc=local
# Location on system where database is stored
olcDbDirectory: /var/lib/ldap
# Manager of the database
olcRootDN: cn=admin,dc=home,dc=local
olcRootPW: admin
# Indices in database to speed up searches
olcDbIndex: uid pres,eq
olcDbIndex: cn,sn,mail pres,eq,approx,sub
olcDbIndex: objectClass eq
# Allow users to change their own password
# Allow anonymous to authenciate against the password
# Allow admin to change anyone's password
olcAccess: to attrs=userPassword
by self write
by anonymous auth
by dn.base="cn=admin,dc=home,dc=local" write
by * none
# Allow users to change their own record
# Allow anyone to read directory
olcAccess: to *
by self write
by dn.base="cn=admin,dc=home,dc=local" write
by * read