OpenLDAPでユーザーを追加する方法
1. パスワード生成
# slappasswd
New password:
Re-enter new password:
{SSHA}xxxxxxxxxxxxxxxxx
2.ldifファイルの作成
# vim /tmp/user007.ldif
dn: uid=cft, ou=people, dc=example, dc=com
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
uid: cft
cn: System Manager
sn: manage
o: people
userPassword: {SSHA}xxxxxxxxxxxxxxxxx
loginShell: /bin/bash
uidNumber: 1010
gidNumber: 1010
homeDirectory: /home/cft
3.ユーザー追加
# ldapadd -x -D “cn=Manager,dc=example,dc=com" -W -f /tmp/user007.ldif
Enter LDAP Password:
adding new entry “uid=cft, ou=people, dc=example, dc=com"
4.追加確認
# slapcat