Name Last Update
lib Loading commit data...
templates Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
LdapService.py Loading commit data...
LdapService2.py Loading commit data...
README.md Loading commit data...
ldaptree.py Loading commit data...

ldapscan

This is some python code to scan and visualize an ldap tree structure.

Synopsis

ldaptree.py ARGUMENT... [OPTION]...

LdapService.py ARGUMENT... [OPTION]... bindip bindport

Description

Create a tree representation of all DNs starting with a given base DN.

There are two programs:

  • ldaptree.py : commandline tool
  • LdapService.py : web service via internal web server

ldaptree.py

Supports simple and kerberos binds via GSSAPI.

If no password OPTION is given for simple binds the password will be asked interactive.

If no outfile the given the result will be written to stdout.

ARGUMENTS

  • -H URI, --hosturi=URI : LDAP URI
  • -D DN, --binddn=DN : The DN to use for the LDAP bind.
  • -b DN, --basedn=DN : The DN to start the tree with.
LDAP URI (-H URI, --hosturi=URI)

The URI to the ldap server to query in the form:

ldap[s]://host.uri[:port]

OPTIONS

  • -h, --help : Online Help
  • -p PASSWORD, --password=PASSWORD : The password for the LDAP bind.
  • -o FILENAME, --outfile=FILENAME : File to write the result to.
  • -k, --kerberos : Use gssapi auth.

LdapService.py

Start a webserver on the given bindip and bindport. On the page a tree representation of all DNs starting with a given base DN is visualized.

Only simple binds to the directory with DN and password are supported.

ARGUMENTS

  • -H URI, --hosturi=URI : LDAP URI
  • -D DN, --binddn=DN : The DN to use for the LDAP bind.
  • -b DN, --basedn=DN : The DN to start the tree with.
  • -p PASSWORD, --password=PASSWORD : The password for the LDAP bind.

OPTIONS

  • -h, --help : Online Help

Requirements

Access to a directory service, OpenLDAP and SAMBA-4 AD are tested.

Dependencies

  • python with ldap module

Contributing

Just write me an email.

License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Author

Georg Hopp georg@steffers.org