Archive for September, 2008|Monthly archive page

First step toward OpenLDAP

After getting some revelation from the Big Bro, I finally able to create my own entry 😀

Here’s a few things to do :

  1. Do some config here and there
    Here we have to edit ldap.conf and slapd.conf in /etc/openldap.
    In ldap.conf, we modify URI to point to our LDAP server and Base to point to the root of our LDAP structure. Usually the base is like this

    Base dc=Example, dc=com

    In slapd.conf, we modify the database (we use bdb), suffix (same with the base in ldap), rootdn (in the example they use cn=manager, so the entry would be like this

    rootdn "cn=manager,  dc=Example, dc=com"

    rootpw is the password for the rootdn, mind the password-hash. Read man slapd.conf to know more about the password-hash

  2. Create an .ldif file (Mine looks like this, except I only used one dc. Forgive me if this one is inaccurate)

    dn: o=Example Indonesia, dc=Example, dc=com
    objectClass: top
    objectClass: organization
    o: Example Indonesia
    dc: Example

    dn: ou=Vendor, o=Example Indonesia, dc=Example, dc=com
    objectClass: top
    objectClass: organizationalUnit
    ou: Vendor
    description: project vendor

    dn: uid=baca, ou=Vendor, o=Example Indonesia, dc=Example, dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    cn: Suka Mbaca
    sn: Mbaca
    givenName: Suka
    ou: Vendor
    uid: baca
    mail: sampah@email.com

    this will create user baca under unit Vendor in organization Example Indonesia. We follow basic schema built in openldap. Custom schema can be added by creating .schema files.

  3. run ldapadd -x -D "cn=manager,dc=example,dc=com" -W -f example.ldif
    Example.ldif is the .ldif file we created earlier. The command will add those entries in the file to the ldap.

New Office, New Toys

It’s been 2 weeks since i moved to the new office. Well, of course it has a lot of brand new toys. Here we have Red Hat Enterprise Linux, Liferay Portal, Zimbra Mail Server, and Jabberd … all connected (to be) by OpenLDAP.

OK, here’s today catch :

In order to install Jabberd-2.2.4, we need to install gnu sasl newer than 0.2.27. I was fooled by the ordering in the site and downloaded 0.2.9, which is older than 0.2.27. Then I decided to install 0.2.27. Here I learned that in order to remove the old installation done by make install we can use make uninstall (if the installer is still intact) .

After I installed it, I find that the error we found from ./configure command in jabberd still persist. Random search at google i found this link http://jabberd2.xiaoka.com/ticket/133. Here I learned that sometimes for a library to work, we have to modify ld.so.conf to include the library and ldconfig to update the links of the library.