Skip to content

About

Pure bash CLI tool to view interactively various LDAP directories. No Apache Directory Studio. No Java. No Python. No Go. No SDKs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ldapbrowser

β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•     β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β•  β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•

License Shell Version LDAP Last Commit

Pure bash+curl+fzf interactive LDAP/AD directory browser for the terminal. No heavy GUI tools. No Java. No Python. No Go. Just bash+curl+fzf+core linux utils.


Table of Contents


🎬 Demo

ldapbrowser demo


πŸ€” Why ldapbrowser?

Browsing LDAP and Active Directory directories has always required heavy tools:

  • Apache Directory Studio β€” Java, heavy, GUI only
  • ldap-utils β€” raw, no UX, hard to navigate large trees
  • Web UIs β€” not always accessible, especially on jump servers

ldapbrowser fills that gap β€” a pure bash+curl+fzf interactive browser that works on any terminal, including jump servers where a browser is not an option.

Zero dependencies beyond what every Linux system already has.


✨ Features

  • 🌳 Interactive tree browsing β€” navigate any LDAP directory tree with fzf
  • πŸ” Object inspection β€” view full details of any LDAP object
  • πŸ’Ύ Snapshot to file β€” save object details to file with Ctrl+S
  • 🎨 Themes β€” customizable terminal UI themes
  • πŸ” Secure β€” FQDN + CA certificate validation, no insecure connections (LDAP with StartTLS or LDAPS)
  • πŸ”„ Replication aware β€” supports multiple LDAP hosts in replication setup
  • πŸ€– Auto-detection β€” LDAP suffix deduced automatically during setup
  • βš™οΈ Full configuration lifecycle management β€” ldapbrowser setup reset/backup/restore
  • πŸ“Ÿ Bash completion generation with one command β€” ldapbrowser completion

⚠️ Known Limitations

  • No LDAP write operations β€” ldapbrowser is a read-only tool by design. Creating, modifying or deleting LDAP objects is not supported. This is an intentional architectural decision β€” curl supports LDAP read queries only. Write operations are planned for v2.0.
  • OneLogin VLDAP does not support StartTLS β€” LDAPS only
  • Cloud LDAP directories with push-based MFA enabled will trigger a push notification per LDAP query β€” see QA matrix notes

πŸ“‹ Requirements

  • bash 4.4+
  • curl with LDAP support
  • fzf 0.30+
  • FQDN hostname for LDAP host(s) β€” no IP addresses
  • Valid certificate issued by internal or external CA
  • Valid CA(s) certificate(s) to add to the configuration while setting up
  • DNS resolution for the FQDN(s)

πŸ§ͺ Tested LDAP Directories

Directory Version StartTLS LDAPS Status
Microsoft Active Directory 2019-2022 βœ… βœ… βœ… Tested
FreeIPA 4.x βœ… βœ… βœ… Tested
OpenLDAP 2.6.x βœ… βœ… βœ… Tested
389 DS 3.1.2 βœ… βœ… βœ… Tested
OpenDJ 5.1.1 βœ… βœ… βœ… Tested
ApacheDS 2.0.0.AM26 βœ… βœ… βœ… Tested
Okta LDAP Cloud βœ… βœ… βœ… Tested
OneLogin VLDAP Cloud N/A βœ… βœ… Tested
JumpCloud Cloud βœ… βœ… βœ… Tested
FoxPass Cloud βœ… βœ… βœ… Tested

πŸš€ Installation

# Clone the repository
git clone https://github.com/mytechspacexyz/ldapbrowser.git

# Add ldapbrowser to PATH via symlink in a folder already in PATH
cd ~/bin; ln -s <ldapbrowser folder>/ldapbrowser ldapbrowser

# Add autocompletion (optional but recommended)
ldapbrowser completion >> ~/.bashrc 
or
ldapbrowser completion >> <path to similar to your shell rc file>

# Run setup
ldapbrowser setup

βš™οΈ Configuration

During ldapbrowser setup you will be prompted for:

  • LDAP host FQDN(s) β€” single host or multiple for replication
  • Bind DN username β€” recommended read-only LDAP administrator account (ldapbrowser is read-only, write operations are not supported)
  • Bind DN password β€” stored as a base64 encoded value, not shown while typing
  • LDAP suffix β€” entered manually or can be deduced automatically
  • CA certificate path

Pay SPECIAL attention to the CA certificate(s) that has to be included (and will be copied to the conf folder) while running ldapbrowser setup. It is best to issue such a certificate for your LDAP host(s) with its FQDN using your internal/external CA or create a self-signed one β€” ldapbrowser is built with curl secure flags requiring the CA certificate for a session. No IP address will work for this setup.

All configuration is stored inside the ldapbrowser conf folder β€” nothing written outside the app directory.

For more details see the short video below:

ldapbrowser setup


πŸ’» Usage

ldapbrowser setup           # configure your LDAP connection
ldapbrowser setup reset     # reset/zero the active configuration
ldapbrowser setup backup    # backup the active configuration
ldapbrowser setup restore   # restore configuration
ldapbrowser completion      # generate bash completion block
ldapbrowser list            # interactively browse the directory tree
ldapbrowser describe        # show ldapbrowser description information
ldapbrowser themes          # customize the interface
ldapbrowser debug on        # enable debug logging
ldapbrowser debug off       # disable debug logging
ldapbrowser version         # show version
ldapbrowser help            # show usage

🧭 Navigation & Key Bindings

fzf Navigation

Key Action
↑ / ↓ Move up/down in the list
Shift+↑ / Shift+↓ Scroll the preview window
Enter Enter object like DN and show its children
Ctrl+S Snapshot object details to file in app folder
Esc / Ctrl+C Exit

πŸ—‘οΈ Uninstallation

# Remove the symlink from PATH
unlink <path to the ldapbrowser symlink>

# Remove bash completion (if added)
# Edit ~/.bashrc or similar and remove:
# - the _ldapbrowser_completion() function block
# - the complete -F _ldapbrowser_completion ldapbrowser line
# Then restart the shell:
exec $SHELL

# Remove the cloned repository
rm -rf <ldapbrowser folder>

πŸ—οΈ Architecture

ldapbrowser/
β”œβ”€β”€ assets/                  # various assets like media files
β”œβ”€β”€ ldapbrowser.bash         # main entry point
β”œβ”€β”€ ldapbrowser              # symlink β†’ ldapbrowser.bash
β”œβ”€β”€ conf/                    # configuration
β”‚   β”œβ”€β”€ .common_configvars
β”‚   β”œβ”€β”€ .configvars
β”‚   └── .deps
β”œβ”€β”€ src/                     # source functions
β”œβ”€β”€ docs/                    # description, help, version
β”œβ”€β”€ data/                    # runtime data like snapshots
β”œβ”€β”€ logs/                    # debug logs
└── examples/                # configuration examples

πŸ§ͺ QA Compatibility Matrix

Directory Browse Snapshot StartTLS LDAPS Notes
Active Directory βœ… βœ… βœ… βœ…
FreeIPA βœ… βœ… βœ… βœ…
OpenLDAP βœ… βœ… βœ… βœ…
389 DS βœ… βœ… βœ… βœ…
OpenDJ βœ… βœ… βœ… βœ…
ApacheDS βœ… βœ… βœ… βœ…
Okta LDAP βœ… βœ… βœ… βœ… Push MFA confirmed to trigger per-query push notification β€” see Known Limitations
JumpCloud βœ… βœ… βœ… βœ… Push MFA may trigger per-query push notification β€” see Known Limitations
OneLogin VLDAP βœ… βœ… N/A βœ… Push MFA may trigger per-query push notification β€” see Known Limitations
FoxPass βœ… βœ… βœ… βœ… Push MFA may trigger per-query push notification β€” see Known Limitations

⚠️ Disclaimer

ldapbrowser is provided as-is. Always test in a non-production environment first. The author is not responsible for any issues arising from use in production environments.


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ™ Acknowledgements


Built with ❀️ for MSPs, DevOps, sysadmins and homelabbers who live in the terminal

GitHub stars

About

Pure bash CLI tool to view interactively various LDAP directories. No Apache Directory Studio. No Java. No Python. No Go. No SDKs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages