Skip to content

Instantly share code, notes, and snippets.

@ckhung
Last active September 24, 2016 02:28
Show Gist options
  • Select an option

  • Save ckhung/5a4731b16c13a14fb393b917b6b06b0a to your computer and use it in GitHub Desktop.

Select an option

Save ckhung/5a4731b16c13a14fb393b917b6b06b0a to your computer and use it in GitHub Desktop.
objectClass inheritance hierarchy as defined in the default schemas of openldap
// generating the content of this file:
// ldapsearch -x -LLL -o ldif-wrap=no -b cn=Subschema -s base '(objectClass=subschema)' + | perl -ne 'print "$2 -> $1;\n" if /\bNAME\s*\x27(\w+)\x27.*?\bSUP\s+(\w+)/' | grep -v '^top ->'
// generating an svg from this file:
// dot -Tsvg ldap-objectClass-hierarchy.dot > ldap-objectClass-hierarchy.svg
digraph "openldap schemas" {
rankdir = LR;
overlap = scale;
distinguishedName -> seeAlso;
olcBackend -> olcDatabase;
labeledURI -> olcInclude;
olcDatabase -> olcOverlay;
labeledURI -> olcReferral;
labeledURI -> olcReplica;
labeledURI -> olcUpdateRef;
name -> title;
postalAddress -> registeredAddress;
distinguishedName -> member;
distinguishedName -> owner;
distinguishedName -> roleOccupant;
name -> initials;
name -> generationQualifier;
name -> dmdName;
name -> pseudonym;
name -> ipServiceProtocol;
name -> nisMapName;
olcConfig -> olcGlobal;
olcConfig -> olcSchemaConfig;
olcConfig -> olcBackendConfig;
olcConfig -> olcDatabaseConfig;
olcConfig -> olcOverlayConfig;
olcConfig -> olcIncludeFile;
olcConfig -> olcModuleList;
olcDatabaseConfig -> olcLdifConfig;
olcDatabaseConfig -> olcHdbConfig;
person -> organizationalPerson;
person -> residentialPerson;
applicationEntity -> dSA;
domain -> RFC822localPart;
domain -> dNSDomain;
country -> friendlyCountry;
dsa -> pilotDSA;
organizationalPerson -> inetOrgPerson;
}
@ckhung

ckhung commented Sep 24, 2016

Copy link
Copy Markdown
Author

This is a drawing of the objectClass inheritance hierarchy as defined in the default schemas of openldap. The content of the dot file is generated by this command:
ldapsearch -x -LLL -o ldif-wrap=no -b cn=Subschema -s base '(objectClass=subschema)' + | perl -ne 'print "$2 -> $1;\n" if /\bNAME\s*\x27(\w+)\x27.*?\bSUP\s+(\w+)/' | grep -v '^top ->'
See http://www.openldap.org/faq/data/cache/1366.html for an explanation.

Then the graphic file is generated by this command:
dot -Tsvg ldap-objectClass-hierarchy.dot > ldap-objectClass-hierarchy.svg
where the dot command comes from the graphviz package.
objectClass without descendants has been removed by the grep command.

ldap-objectclass-hierarchy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment