2010年7月4日日曜日

[C2U] LDAPサーバの構築(ユーザ登録)

出来上がった入れ物にユーザを追加するテスト。
今回のターゲットはジョーンさん。

ユーザ登録
$ vi user.ldif
dn: uid=john,ou=people,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: john
sn: Doe
givenName: John
cn: John Doe
displayName: John Doe
uidNumber: 10001
gidNumber: 10001
userPassword: password
gecos: John Doe
loginShell: /bin/bash
homeDirectory: /home/john
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 8
shadowMax: 999999
shadowLastChange: 10877
mail: john.doe@example.com
postalCode: 31000
l: Toulouse
o: Example
title: System Administrator
postalAddress:
initials: JD

dn: cn=example,ou=groups,dc=example,dc=com
objectClass: posixGroup
cn: example
gidNumber: 10001

$ sudo ldapadd -x -D cn=admin,dc=example,dc=com -W -f user.ldif

0 件のコメント: