# OpenLDAP: how can I list active schemes, classes etc?



## setevoy (Jan 5, 2014)

Hello, people.

Can I get list of existing entries using any console utilities? For example - I can get a tree of my filesystem with `tree`:

```
$ tree
.
├── Catalina
│   └── localhost
│       ├── host-manager.xml
│       └── manager.xml
├── catalina.policy
├── catalina.properties
```

Can I get a similar view with `shelldap`, `ldapsctritps` or built OpenLDAP utilities?


----------



## SirDice (Jan 6, 2014)

Try using ldapsearch, it should be included with the openldap-client port/package. Although it won't print a nice tree, it will print the entries.


----------



## setevoy (Jan 6, 2014)

SirDice said:
			
		

> Try using ldapsearch, it should be included with the openldap-client port/package. Although it won't print a nice tree, it will print the entries.



Thanks, but it's really doesn't show a "tree"


----------



## SirDice (Jan 6, 2014)

LDAP doesn't really have a tree structure so I think it would be rather pointless to print a tree with just one branch.


----------



## kisscool-fr (Jan 6, 2014)

You can try to search for "ou" entries with ldapsearch, grep "ou" entries and then sort them. It will not be exactly a tree but what approaches it the most. I agree it's basic.


----------



## setevoy (Jan 6, 2014)

Well, I found something. Not exactly what I want - but a little bit of it - lsldap from the ldapscripts package:


```
# lsldap
Warning : using command-line passwords, ldapscripts may not be safe
dn: dc=testdn1
objectClass: top
objectClass: dcObject
objectClass: organization
dc: testdn1
o: TestLDAP
description: Testing LDAP server DIT number one

dn: ou=localhost,dc=testdn1
objectClass: organizationalUnit
ou: localhost

dn: ou=sysgroups,ou=localhost,dc=testdn1
objectClass: organizationalUnit
ou: sysgroups

dn: ou=sysusers,ou=localhost,dc=testdn1
objectClass: organizationalUnit
ou: sysusers

dn: cn=sysusers,ou=sysgroups,ou=localhost,dc=testdn1
objectClass: posixGroup
cn: sysusers
gidNumber: 10000
description: Group account
```

But if somebody will find something else - let me know here, please.

Anyway - thanks for the tips.


----------



## redw0lfx (Jan 7, 2014)

The only thing I can think of that might show what you are looking for would be net/phpldapadmin.  Its a PHP web application that must be installed, but once set[ ]up, it allows you to browse/search/update your LDAP directory.

-W


----------

