2018-01-26 12:38:19 +01:00
|
|
|
# Web UI for LDAP changing password
|
|
|
|
|
|
|
|
WebUI Client capable of connecting to backend LDAP server and changing the users password.
|
|
|
|
|
|
|
|
![Screenshot](screenshots/index.png)
|
|
|
|
|
2018-01-27 20:19:44 +01:00
|
|
|
The configuration is made with environment variables:
|
|
|
|
|
|
|
|
|Env variable|Default value|Description|
|
|
|
|
|------------|-------------|-----------|
|
|
|
|
|LPW_TITLE|Change your global password for example.org|Title that will appear on the page|
|
|
|
|
|LPW_HOST||LDAP Host to connect to|
|
|
|
|
|LPW_PORT|636|LDAP Port (389|636 are default LDAP/LDAPS)|
|
|
|
|
|LPW_ENCRYPTED|true|Use enrypted communication|
|
|
|
|
|LPW_START_TLS|false|Start TLS communication|
|
|
|
|
|LPW_SSL_SKIP_VERIFY|true|Skip TLS CA verification|
|
|
|
|
|LPW_USER_DN|uid=%s,ou=people,dc=example,dc=org|Filter expression to search the user for Binding|
|
|
|
|
|LPW_USER_BASE|ou=people,dc=example,dc=org|Base to use when doing the binding|
|
|
|
|
|
|
|
|
## Running
|
|
|
|
|
|
|
|
```sh
|
|
|
|
dep ensure
|
|
|
|
LPW_HOST=ldap_host_ip go run main.go
|
|
|
|
```
|
|
|
|
|
|
|
|
Browse [http://localhost:8080/](http://localhost:8080/)
|
|
|
|
|
|
|
|
### Running in docker container
|
2018-01-26 12:38:19 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
docker run -d -p 8080:8080 --name ldap-passwd-webui \
|
|
|
|
-e LPW_TITLE="Change your global password for example.org" \
|
|
|
|
-e LPW_HOST="your_ldap_host" \
|
|
|
|
-e LPW_PORT="636" \
|
|
|
|
-e LPW_ENCRYPTED="true" \
|
|
|
|
-e LPW_START_TLS="false" \
|
|
|
|
-e LPW_SSL_SKIP_VERIFY="true" \
|
|
|
|
-e LPW_USER_DN="uid=%s,ou=people,dc=example,dc=org" \
|
|
|
|
-e LPW_USER_BASE="ou=people,dc=example,dc=org" \
|
2018-09-21 10:06:27 +02:00
|
|
|
-e LPW_PATTERN='.{8,}' \
|
|
|
|
-e LPW_PATTERN_INFO="Password must be at least 8 characters long." \
|
2018-01-26 12:38:19 +01:00
|
|
|
npenkov/docker-ldap-passwd-webui:latest
|
|
|
|
```
|
|
|
|
|
|
|
|
## Building and tagging
|
|
|
|
|
2018-01-27 20:19:44 +01:00
|
|
|
Get [Godep](https://github.com/golang/dep)
|
|
|
|
```sh
|
|
|
|
go get -u github.com/golang/dep/cmd/dep
|
|
|
|
```
|
|
|
|
|
2018-01-26 12:38:19 +01:00
|
|
|
```sh
|
|
|
|
make
|
|
|
|
```
|
|
|
|
|
|
|
|
## Credits
|
|
|
|
|
|
|
|
* [Web UI for changing LDAP password - python](https://github.com/jirutka/ldap-passwd-webui)
|
2018-06-16 18:58:13 +02:00
|
|
|
* [Gitea](https://github.com/go-gitea/gitea)
|
|
|
|
* [dchest/captcha](https://github.com/dchest/captcha)
|