Schema Conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks.  The script looks pretty useful.  I've created an OpenLDAP 
migration section of the wiki - 
http://directory.fedora.redhat.com/wiki/Howto:OpenLDAPMigration#Schema - 
and added your script.  I left in your name but removed your email 
address.  I can add it back if you like.

Nathan Benson wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> DC / list,
>
> i have a quick and dirty perl script i had cooked up to do this.  it was
> enough to allow me to convert some openldap schema to FDS.  i was able
> to successfully start FDS after converting a few of them (samba3, etc).
>
> i probably went about it all wrong.  for instance the dn: line is
> probably written out incorrectly (i just did what i could to make it
> work).  i haven't even tried importing a database using the newly
> converted schemas, so your milage will almost certainly vary.
>
> anyway, i've pasted it in the message below because i'm not sure if the
> list allows attachments.  i hope it's of some use to people trying to
> make the switch from openldap to FDS.
>
> - ------------- SNIP ------------------
>
> #!/usr/bin/perl -w
> #
> # this is a quick perl script to convert OpenLDAP schema files
> # to FDS ldif (schema) files.  it is probably not anywhere near
> # useful, but it did allow me to convert a few of my .schema
> # files and have FDS successfully start with them.
> #
> # -Nathan Benson (nathan.benson at sourcefire.com)
> #
>
>
> use strict;
>
>
> die "usage: $0 <openldap.schema>\n" unless my $file = $ARGV[0];
> die "$! '$file'\n" unless -e $file;
>
>
> my $start;
>
>
> print "dn: cn=schema\n";
>
>
> open SCHEMA, $file;
> while (<SCHEMA>)
> {
> ~        next if /^(#|$)/;
>
>
> ~        if (/^(objectclass|attributetype)\s/)
> ~        {
> ~                print "\n" if ($start);
> ~                chomp;
>
>
> ~                $_     =~ s/^objectclass/objectclasses:/i;
> ~                $_     =~ s/^attributetype/attributetypes:/i;
> ~                $_     =~ s/(\t|\s)/ /;
>
>
> ~                $start = 1;
> ~                print;
> ~        }
> ~        elsif ((/^\s*\w/) && ($start))
> ~        {
> ~                chomp;
> ~                $_     =~ s/^(\s*)/ /;
> ~                print;
> ~        }
> }
> close SCHEMA;
>
> - ------------- SNIP ------------------
>
> D Canfield thus spake on 06/08/2005 07:51 PM:
> | I don't suppose anyone has found an easy way to convert OpenLDAP schema
> | into fedora-ds compatible ldif files?  We've got about 100 attributes
> | defined, and I'm really not looking forward to entering them all by
> hand...
> |
> | Thanks
> | DC
> |
> | --
> | Fedora-directory-users mailing list
> | Fedora-directory-users at redhat.com
> | https://www.redhat.com/mailman/listinfo/fedora-directory-users
> |
>
> - --
> Nathan Benson
> http://sourcefire.com/
>
> 1C1A F2C1 82AD F75F 9B6B  E501 0D73 DC9B E96B DD96
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQFCqKLpDXPcm+lr3ZYRAhTqAJ0eBY4Z8Jndv7Bn509p5pe9ZsY4VgCgpuG5
> +neqFO+KnYQmHs17PvQdaMw=
> =v5oZ
> -----END PGP SIGNATURE-----
>
> -- 
> Fedora-directory-users mailing list
> Fedora-directory-users at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-directory-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3312 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/389-users/attachments/20050609/e7f8f287/attachment.bin 


[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux