Created
November 15, 2013 09:01
-
-
Save shutingrz/7481346 to your computer and use it in GitHub Desktop.
OpenLDAP24 server on FreeBSD9.2 in ConvivialNet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #openldap24-server | |
| root@titan:/usr/home/shu # cd /usr/ports/net/openldap24-server/ | |
| root@titan:/usr/ports/net/openldap24-server # make config-recursive | |
| #openldap24-server | |
| +ACCESSLOG , +SASL | |
| #cyrus-sasl-2.1.26_3 | |
| +BDB | |
| #openldap-sasl-client-2.4.37 | |
| +FETCH | |
| #perl5-5.16.3_2 | |
| default | |
| root@titan:/usr/ports/net/openldap24-server # make install clean | |
| root@titan:/usr/ports/net/openldap24-server # vi /etc/rc.conf | |
| +slapd_enable="YES" | |
| +slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"' | |
| +slapd_sockets="/var/run/openldap/ldapi" | |
| root@titan:/usr/home/shu # cd /usr/local/etc/openldap/ | |
| root@titan:/usr/local/etc/openldap # touch /var/log/slapd.log | |
| root@titan:/usr/local/etc/openldap # vi /etc/syslog.conf | |
| +local4.* /var/log/slapd.log | |
| root@titan:/usr/local/etc/openldap # cp /usr/local/etc/openldap/DB_CONFIG.example /var/db/openldap-data/DB_CONFIG | |
| root@titan:/usr/local/etc/openldap # vi slapd.conf | |
| +include /usr/local/etc/openldap/schema/cosine.schema | |
| +include /usr/local/etc/openldap/schema/nis.schema | |
| +include /usr/local/etc/openldap/schema/dyngroup.schema | |
| +include /usr/local/etc/openldap/schema/inetorgperson.schema | |
| +moduleload back_hdb | |
| +access to * | |
| + by dn="cn=admin,dc=convivial,dc=ne,dc=jp" write | |
| + by * read | |
| +access to attrs=userPassword,shadowLastChange | |
| + by dn="cn=admin,dc=convivial,dc=ne,dc=jp" write | |
| + by anonymous auth | |
| + by self write | |
| + by * none | |
| +access to dn.base="" by * read | |
| +backend hdb | |
| +database hdb | |
| +suffix "dc=convivial,dc=ne,dc=jp" | |
| +rootdn "cn=Manager,dc=convivial,dc=ne,dc=jp" | |
| +rootpw ******** | |
| #パスワード | |
| +index objectClass,uid,uidNumber,gidNumber,memberUid,uniqueMember,displayName,cn eq | |
| +loglevel 256 | |
| root@titan:/usr/home/shu # slapadd -l little.ldif | |
| #あらかじめldifは持っている前提 | |
| root@titan:/usr/home/shu # /usr/local/etc/rc.d/slapd start | |
| root@titan:/usr/local/etc/openldap # vi ldap.conf | |
| +BASE dc=convivial,dc=ne,dc=jp | |
| +URI ldap://localhost | |
| root@titan:/usr/local/etc/openldap # ldapsearch -x | |
| #結果が正常に表示されたらOK | |
| #ruby19+rubygem(ruby_adduser.rb用) | |
| root@titan:/usr/ports/lang/ruby19 # make config | |
| #all default | |
| root@titan:/usr/ports/lang/ruby19 # make install clean | |
| root@titan:/usr/ports/devel/ruby-gems # make config-recursive | |
| root@titan:/usr/ports/devel/ruby-gems # make install clean | |
| root@titan:/usr/ports/devel/ruby-gems # gem install ruby-gem | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment