Random ...
July 2018
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Tags ...

Linux++:::: OpenLDAP + Thunderbird howto
Posted at 22.Nov,2007 18:56  Comments 0 / Trackbacks 0 / Like this post!
Technorati tag(s):

here's how I set up openldap for use with thunderbird.

Install openldap, and modify slapd.conf:

  include         /etc/openldap/schema/core.schema
  include         /etc/openldap/schema/cosine.schema
  include         /etc/openldap/schema/inetorgperson.schema
  include         /etc/openldap/schema/misc.schema
  include         /etc/openldap/schema/nis.schema

  database        bdb
  suffix          "dc=co,dc=com,dc=my"
  rootdn          "cn=Manager,dc=co,dc=com,dc=my"
  # Cleartext passwords, especially for the rootdn, should
  # be avoided.  See slappasswd(8) and slapd.conf(5) for details.
  # Use of strong authentication encouraged.
  rootpw          fatchance

Now, we start openldap. Either use the init script that comes with your distro, or just run:

  /usr/sbin/slapd -u ldap -g ldap -h "ldap:///"

Now that we're running, we need to add a manager:

  ldapadd -x -D "cn=Manager,dc=nstp,dc=com,dc=my" -W -f man.ldif

where man.ldif contains:

  cat man.ldif
  dn: dc=co,dc=com,dc=my
  objectClass: dcObject
  objectclass: organization
  o: my company
  dc: co

  dn: cn=Manager,dc=nstp,dc=com,dc=my
  objectclass: organizationalRole
  cn: Manager

We can replace Manager with any user name we want.

Now we need to stop openldap so that we can add users from /etc/passwd to openldap:

  pkill slapd

now, go get MigrationTools, untar and go to the directory. We need to modify a few things to get things running.

First, specify our defaults in migrate_common.pl:

  # Default DNS domain
  $DEFAULT_MAIL_DOMAIN = "co.com.my";

  # Default base
  $DEFAULT_BASE = "dc=co,dc=com,dc=my";

And enable extended schema for more attributes:

  # turn this on to support more general object clases
  # such as person.

Now we edit migrate_passswd.pl and comment out anything kerberos:

  #       if ($DEFAULT_REALM) {
  #               print $HANDLE "objectClass: kerberosSecurityObject\n";
  #       }


  #       if ($DEFAULT_REALM) {
  #               print $HANDLE "krbName: $user\@$DEFAULT_REALM\n";
  #       }

Now run perl migrate_passwod.pl /etc/passwd outfile, where outfile will contain all ourentries.

To add entries to ldap, run::

slapadd -l outfile -f /etc/openldap/slapd.conf -d -1

And we wait..

See the mapping between ldap and thunderbird attributes at http://www.clearchain.com/wiki/LDAPAddressBook

Now at thunderbird, edit our preferences, and set new ldap address book.

I'll post snapshot, if available, soon.

Bookmark and Share

Is this entry helpful? Comments/Donate/Click some google ads.  
Trackback is http://myzope.kedai.com.my/blogs/kedai/161/tbping 

Post a comment