ÆÉ¤ß ¡Ú¥¨¥ë¥À¥Ã¥×¡Û ´Êñ¤Ë¸À¤¨¤ÐID¤ä¥Ñ¥¹¥ï¡¼¥É¤ò°ì¸µ´ÉÍý¤¹¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¡£ ¥µ¡¼¥Ð¤Ë¤ÏApacheDS¤â¤¢¤ë¤¬¡¢¥É¥¥å¥á¥ó¥È¤¬½¼¼Â¤·¤Æ¤¤¤ëOpenLDAP¤ò¥µ¡¼¥Ð¤ËºÎÍÑ OpenLDAP¤Î¥¤¥ó¥¹¥È¡¼¥ë†# yum install openldap openldap-devel openldap-servers openldap-clients ÀßÄê # vi /etc/openldap/slapd.conf # ¥¹¥¡¼¥Þ¥Õ¥¡¥¤¥ë»ØÄê include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema include /etc/openldap/schema/nis.schema # PID,µ¯Æ°»þ¥ª¥×¥·¥ç¥óÊݸ¾ì½ê pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args # »ÈÍÑDB Berkeley DB database bdb # ¥Ù¡¼¥¹¤ÎDN suffix "dc=example,dc=com" # ´ÉÍý¼Ô¤ÎDN rootdn "cn=Manager,dc=example,dc=com" # ´ÉÍý¼Ô¤Î¥Ñ¥¹¥ï¡¼¥É rootpw secret # ¥Ç¡¼¥¿Êݸ¾ì½ê directory /var/lib/ldap # INDEX index objectClass eq,pres index ou,cn,mail,surname,givenname eq,pres,sub index uidNumber,gidNumber,loginShell eq,pres index uid,memberUid eq,pres,sub index nisMapName,nisMapEntry eq,pres,sub # /etc/rc.d/init.d/ldap start LDIF¤ÎºîÀ®†¥Ç¥£¥ì¥¯¥È¥ê¹½Â¤¤Ç´ÉÍý¤¹¤ë¤Î¤Ç¥ë¡¼¥È¤òLDIF¤Î·Á¼°¤Î¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¡¢Äɲ乤ë root.ldif dn: dc=example,dc=com objectClass: dcObject objectClass: organization dc: example o: example # ldapadd -x -D 'cn=Manager,dc=example,dc=com' -w secret -f root.ldif
Éô½ð¤ÎLDIF¤òºîÀ®¤·¡¢Äɲà unit.ldif dn: ou=abc,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: abc dn: ou=xyz,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: xyz # ldapadd -x -D 'cn=Manager,dc=example,dc=com' -w secret -f unit.ldif ¥æ¡¼¥¶¡¼¤ÎLDIF¤òºîÀ®¤·¡¢Äɲà user.ldif dn: cn=Taro Yamada,ou=abc,dc=example,dc=com objectClass: top objectClass: person cn: Taro Yamada sn: Yamada dn: cn=Hanako Yamada,ou=abc,dc=example,dc=com objectClass: top objectClass: person cn: Hanako Yamada sn: Yamada # ldapadd -x -D 'cn=Manager,dc=example,dc=com' -w secret -f user.ldif ¸¡º÷†Éôʬ°ìÃ׸¡º÷¤âOK
# ldapsearch -x -b 'dc=example,dc=com' -s sub '(cn=Hanako Yamada)' ¥¯¥é¥¤¥¢¥ó¥È†Apache Directory Studio¤òÍøÍÑ ¥Ø¥ë¥× - ¥½¥Õ¥È¥¦¥§¥¢¹¹¿· - ¸¡º÷¤ª¤è¤Ó¥¤¥ó¥¹¥È¡¼¥ë - ¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¿·µ¬¥Õ¥£¡¼¥Á¥ã¡¼¤ò¸¡º÷ Apache Directory Studio LDAP Browser¤òÁªÂò¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë LDAP connection¤òºîÀ®¤¹¤ë ¥µ¡¼¥Ð¦¤Îhosts.allow¤Ê¤É¤ÇÀ©¸Â¤ò¤«¤±¤Æ¤¤¤ë¾ì¹ç¤Ï°Ê²¼¤Î¤è¤¦¤ËÄɲ䷤Ƥä¤ë slapd: 127.0.0.1 192.168.1. »²¹Í ¾¤Ë¤ÏLDAP Browser/Editor¤¬¤¢¤ë »²¹Í¥µ¥¤¥È†OpenLDAP SambaϢư |