Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7331010D2F for ; Sat, 12 Apr 2014 23:38:03 +0000 (UTC) Received: (qmail 36786 invoked by uid 500); 12 Apr 2014 23:38:02 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 36758 invoked by uid 500); 12 Apr 2014 23:38:02 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 36740 invoked by uid 99); 12 Apr 2014 23:38:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2014 23:38:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 209.85.192.49 as permitted sender) Received: from [209.85.192.49] (HELO mail-qg0-f49.google.com) (209.85.192.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2014 23:37:56 +0000 Received: by mail-qg0-f49.google.com with SMTP id j107so159888qga.22 for ; Sat, 12 Apr 2014 16:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=cb6gB5nAp6Oyw3XIC4aruHCBT5gDuVvm7DWEvh9wIjQ=; b=wZQ/kossXBdcMdxpWEodzGTUc9fQqVLQwE6pmKaPFKJ9iqpGEubKCdESBiL7g5YKpu gqaLHk/VYGZVYqt9KZlCw5Krh7Q3HWLnyLdDQ4nhgfAKMu7dlvMNn5fUkzoi21a7vyNG EDavQgS2mTh/Sr1WKDYZj7cqIrD3OIscUMDHaYXlL3jpe69lAWKyZ5UaDZcH2j9HDsLG +yOioR7IGy0BDkAhXgtZsYn2fUa3vIV+ZVxR1mNWgLeOqhD7MaJAxpx7NEY76foMwKE4 klrZGoL3utnOqG5U7iXxXJovQBhWFHueBDEtAjDb51xVfK0bcMiddObZB8BVWkEvI8Aq frsA== X-Received: by 10.229.89.65 with SMTP id d1mr40303503qcm.14.1397345855297; Sat, 12 Apr 2014 16:37:35 -0700 (PDT) Received: from new-host-3.home (AMontsouris-651-1-20-56.w82-123.abo.wanadoo.fr. [82.123.43.56]) by mx.google.com with ESMTPSA id 11sm11546544qgv.20.2014.04.12.16.37.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Apr 2014 16:37:34 -0700 (PDT) Message-ID: <5349CE3E.6000209@gmail.com> Date: Sun, 13 Apr 2014 01:37:34 +0200 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: Import custom schema from OpenLDAP References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Le 4/11/14 3:01 PM, Fabrice Aupert a écrit : > Hi Emmanuel, > > Thanks for your answer. > >> You should *urgently* switch to 2.4. > I was wrong actually. We're using OpenLdap 2.4. > >> Can you provide the exported LDIF ? > See attached file. It contains quite a lot of attribute types and object > classes from a Sun LDAP server which our client uses. As we can't have this > proprietary LDAP serve in our infrastructure, I made a first import into an > OpenLDAP server. Now we have to migrate to ApacheDS - for depressing > reasons I'd rather not explain here . This file does contains what is in the subschema subentry of your OpenLDAP server. That's fine, but that's not something Studio will be able to load as is. You need to make it a standard openldap schema file (ie, if you store this file in the schema subdirectory of any OpenLDAP server, and ask OpenLDAP to load it, it will fail). However, this is not exactly tough to transform this file so that it can be loaded : - remove the dn, and other things at the very beginning of the file, up to the first attributeTypes attributeType. - replace *all* the 'attributTypes:' to become 'attributetype' (beware : this is case sensitive) - do the same thing for 'objectClasses:' to be replaced with 'objectclass' - now, you will have to go through all the elements, and merge the lines so that each AT and OC are on one single line. An exemple : attributeTypes: ( 1.3.6.1.4.1.6054.3.125.2.56 NAME 'erADLastFailedLogin' DESC 'Data of last failed login attempt.' SYNTAX 1.3.6.1.4.1.1466.115.121.1. 15 SINGLE-VALUE X-ORIGIN 'user defined' ) becomes : attributetype ( 1.3.6.1.4.1.6054.3.125.2.56 NAME 'erADLastFailedLogin' DESC 'Data of last failed login attempt.' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'user defined' ) You will then be able to load the resulting file as an OpenLDAP schema. Ye,s the last step is a bit painful, but it does the trick. You just have to be careful not to leave extra spaces in the middle of elements liks syntax or any other keyword. I did it for a few elements, it worked. Hoep it helps. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com