I'm using openldap-server-2.4.38_1 on FreeBSD 9.1-RELEASE-p5.

1) can I get list of active (connected) schemes without viewing slapd.conf file?

2) how can I get description of obectClasses and/or it's attributes in this schemes whiout viewing scheme file?

So - it there any pre-builded utils (I mean utils like ldapsearch etc), or - something external scripts like ldapscripts? Or may be I can obtain this info directly from ldapshell or phpldapadmin (but I don't like use utils with web-interface...)?

  • List schemas in use: ldapsearch -A -x -h localhost -D "cn=admin,cn=config" -w <PASSWORD> -b "cn=config" objectClass="olcSchemaConfig" | egrep "# {" | egrep ", schema, config" | sed -e 's/.*}\(.*\), schema.*/\1/'! Thanks! – Eduardo Lucio May 17 '18 at 18:56

Yes to both.

ldapsearch -H ldap://ldap.mydomain.com -x -s base -b "" +
# the + returns operational attributes

will give a list of supported features. You may want to look up the meaning of the IOD's that get returned here.

More interesting stuff is in the cn=Subschema section:

ldapsearch -H ldap://ldap.mydomain.com -x -s base -b "cn=subschema" objectclasses

which will list all supported ObjectClasses.

Note that unlike other LDAP servers you can't use LDAP commands to extend the scheme in the live server and must edit the files and restart your openldap server to modify the schema.

  • 1
    And - how I can get description of objectclass directly from LDAP? For example - I want to see all attributes (and/or description) of objectClass: dcObject. I tried use ldapsearch with filters - but without result... – setevoy Jan 4 '14 at 14:22

Your Answer

