[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Can I read the schema using LDAP?



Thomas Gagné wrote:

Is there a way to read the schemas from ldap? If you wanted to build a dynamic UI it would have to know what was posssible for objects and attributes. I haven't noticed a way to do that in the man pages (yet).


To see OpenLDAP schema in the raw, try this command (all one line):

ldapsearch -h localhost -x -b cn=subschema -s base objectClass=subschema matchingRules ldapSyntaxes objectClasses attributeTypes

There are plenty of implementations of LDAP schema parsers out there in nearly every language. Here's one in PHP (from phpLDAPadmin):

<http://cvs.sourceforge.net/viewcvs.py/phpldapadmin/phpldapadmin/schema_functions.php?rev=1.57&view=auto>

--Dave