From fc84ded0c6fffa6e7cd914d9ff50bfa3856b9924 Mon Sep 17 00:00:00 2001 From: coja Date: Mon, 3 Aug 2026 21:44:09 +0200 Subject: [PATCH] [Doc] readme update --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b813f9..5ba6409 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,69 @@ -# Flask LDAP user management +# LUSER -Web app that allows users to add,remove and change passwords in LDAP system +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 +- `passlib` for secure password hashing +- `Flask` for the web framework + +## Installation + +1. **Clone the repository**: + ```bash + git clone + cd luser + ``` + +2. **Install dependencies**: + ```bash + pip install -r requirements.txt + ``` + +3. **Configure the application**: + Edit the `config.ini` file 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. + +4. **Setup Captcha script**: + Ensure the `captcha.sh` script is available in `/usr/local/bin/` and is executable. + +## Running the Application + +You can run the application using the provided `run.py` script: + +```bash +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_sha1` for 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.