database bdb
suffix "dc=example,dc=com"
checkpoint 4 15
rootdn "cn=manager,dc=example,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw secret
rootpw {MD5}4QrcOUm6Wau+VuBX8g+IPg==
[root@localhost migrationtools]# vim base.ldif
dn: dc=example,dc=com
dc: example
objectClass: top
objectClass: domain
dn: ou=People,dc=example,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit
dn: ou=Group,dc=example,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit
导入base.ldif数据文件:
1
2
3
4
5
[root@localhost migrationtools]# ldapadd -x -D "cn=manager,dc=example,dc=com" -W -x -f base.ldif
Enter LDAP Password: --输入上面设置好的密码
adding new entry "dc=example,dc=com"
adding new entry "ou=People,dc=example,dc=com"
adding new entry "ou=Group,dc=example,dc=com"