2.4 KiB
2.4 KiB
LUSER
A lightweight user management system for LDAP, implemented using Flask. This application provides a web interface for users to register, change passwords, and unregister themselves from an LDAP directory.
Features
- User Registration: New users can create an account with a captcha to prevent automated registrations.
- Password Management: Users can change their LDAP passwords securely.
- User Unregistration: Users can remove themselves from the LDAP system.
- Captcha Protection: Uses a custom captcha mechanism to mitigate bot registrations.
- LDAP Integration: Directly interacts with LDAP for all credential and user management tasks.
Prerequisites
- Python 3.x
- LDAP Server
passlibfor secure password hashingFlaskfor the web framework
Installation
-
Clone the repository:
git clone <repository-url> cd luser -
Install dependencies:
pip install -r requirements.txt -
Configure the application: Edit the
config.inifile to provide your LDAP server details and paths:LDAPHOST: Address of your LDAP server.LDAPADMINNAME: Admin username for LDAP operations.LDAPPASS: Admin password for LDAP operations.USERBASE: The base DN for users.CAPTCHA_PATH: Path where captcha images are stored.
-
Setup Captcha script: Ensure the
captcha.shscript is available in/usr/local/bin/and is executable.
Running the Application
You can run the application using the provided run.py script:
python run.py
The application will be available at http://localhost:5000 (or the port specified in your configuration).
Project Structure
luser/: Main application package.routes.py: Defines the web endpoints and business logic.models.py: Handles LDAP interactions.templates/: HTML templates for the web interface.static/: Static files (CSS, etc.).
build-deb/: Contains instructions and files for building a Debian package.run.py: Entry point for the Flask application.config.ini: Configuration file for LDAP and system settings.
Security Considerations
- This application uses
ldap_salted_sha1for password hashing. - Ensure the LDAP connection is secured (e.g., via LDAPS) in production environments.
- The captcha mechanism is implemented to prevent automated registration attempts.