Results 1 to 4 of 4

Thread: Export Zimbra users to external ldap

  1. #1
    jncolin is offline New Member
    Join Date
    Nov 2007
    Posts
    4
    Rep Power
    7

    Default Export Zimbra users to external ldap

    Hi

    I'm currently running ZCS 4.5.10, quite happily I must say
    For various reasons, i would like to export all my user data from Zimbra's openldap (only the users, not the aliases) to another openldap server.

    I'm not willing to setup replica for Zimbra's openldap, but simply export what's below ou=people, and reload it into my other openldap server.

    What would be needed to achieve that? I tried exporting the content using slapcat but it seems Zimbra is using specific object classes to represent users.

    Thanks for your help

    Jean-Noel Colin

  2. #2
    chipmunk's Avatar
    chipmunk is offline Active Member
    Join Date
    Nov 2007
    Location
    Belgium
    Posts
    35
    Rep Power
    7

    Default

    you'll have to add the schemas from the zimbra openldap in your personnal LDAP
    and then you need to export the datas with slapcat and import them inside the other.
    The schemas are in <zimbra>/openldap/etc/openldap/schemas
    Don't forget to add the loading of these schemas in your external ldap server

  3. #3
    jncolin is offline New Member
    Join Date
    Nov 2007
    Posts
    4
    Rep Power
    7

    Default

    thanks for the tip; but what I would like is to recreate my users as standard inetorgpersons, and, most importantly not loose the password information. Unfortunately, in the information exported by slapcat, the users do not appear as inetorgpersons

  4. #4
    zen
    zen is offline Project Contributor
    Join Date
    Oct 2007
    Location
    Poznan, Poland
    Posts
    7
    Rep Power
    7

    Default

    I would suggest writing simple parser for ldif file. Python + ldap module will do just fine. Something like:
    Code:
    class zimbraParser(ldif.LDIFParser):
    	def __init__(self,input_file,ignored_attr_types=None,max_entries=0,process_url_schemes=None,line_sep='\n' ):
    		ldif.LDIFParser.__init__(self,input_file,ignored_attr_types,max_entries,process_url_schemes,line_sep)
    
    	def handle(self,dn,entry):
    		if 'organizationalPerson' in entry['objectClass']:
    			print "dn: ",entry.get('dn',[''])[0]
    			print "givenName: ",entry.get('givenName',[''])[0]
    			# etc., etc.
    file = open(args[0],'r')
    ldif_parser = zimbraParser(file)
    ldif_parser.parse()

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 09:56 PM
  2. [SOLVED] Error Installing Zimbra on RHEL 5
    By harris7139 in forum Installation
    Replies: 10
    Last Post: 09-25-2007, 11:39 AM
  3. upgrade woes -made into new thread
    By JustinHarlow in forum Installation
    Replies: 18
    Last Post: 06-08-2007, 12:11 PM
  4. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 10:34 PM
  5. Mail logs
    By Rick Baker in forum Installation
    Replies: 8
    Last Post: 01-17-2006, 04:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •