UNDERCODE COMMUNITY
2.68K subscribers
1.23K photos
31 videos
2.65K files
80.3K links
🦑 Undercode Cyber World!
@UndercodeCommunity


1️⃣ World first platform which Collect & Analyzes every New hacking method.
+ AI Pratice
@Undercode_Testing

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE

Web & Services:
Undercode.help
Download Telegram
4) If you want to set this variable in the docker run command, add the tag # PYTHON2BASH: and convert yaml in python:

docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.2.2

5) Other environment variables are as follows:

KEEP_EXISTING_CONFIGDo not change the ldap configuration. The default isfalse
true,config。image tlsLDAP_ADMIN_PASSWORD和LDAP_CONFIG_PASSWORD
true,]bootstap lschema,replication config。
LDAP_REMOVE_CONFIG_AFTER_SETUPDelete the configuration folder after installation. The default istrue

6) LDAP_SSL_HELPER_PREFIXssl-helper environment variable prefix. The default is ldap, and ssl-helper first searches for the configuration from the LDAP_SSL_HELPER_ * variables before the SSL_HELPER_ * variables.

7) HOSTNAMESet the host name of the running openldap server. Defaults to anything created by docker.

8) openLDAP data persistence
Add the following parameters to the docker run command to save the LDAP database file and LDAP configuration file outside the container. The same two parameters are added next time the container is re-created, that is, the existing ldap database can be used.

--volume /data/slapd/database:/var/lib/ldap \
--volume /data/slapd/config:/etc/ldap/slapd.d \

9) Install phpLDAPadmin
Install Apache and PHP
yum -y install httpd php php-ldap php-gd php-mbstring php-pear php-bcmath php-xml

10) Download phpldapadmin
wget https://nchc.dl.sourceforge.net/project/phpldapadmin/phpldapadmin-php5/1.2.3/phpldapadmin-1.2.3.tgz

Unzip phpldapadmin
tar -zxf phpldapadmin-1.2.3.tgz

11) Put the phpldapadmin directory under / var / www / html
mv phpldapadmin-1.2.3 /var/www/html/phpldapadmin

12) Modify the configuration file
cd /var/www/html/phpldapadmin/config
cp config.php.example config.php
vim config.php

13) The configuration file is modified as follows:
$servers->newServer('ldap_pla');
$servers->setValue('server','name','LDAP Server');
$servers->setValue('server','host','127.0.0.1');
$servers->setValue('server','port',389);
$servers->setValue('server','base',array('[openLDAP'));/:dc=example,dc=org*/
$servers->setValue('login','auth_type','session');
$servers->setValue('login','bind_id','openLDAP]');/*=:cn=admin,dc=example,dc=org*/
$servers->setValue('login','bind_pass','[openLDAP]');/*:admin*/
$servers->setValue('server','tls',false);

14) Start httpd service
systemctl start httpd

15) If you need to modify the configuration file, you need to modify the config.phpfile and restart the httpd service.systemctl restart httpd

16) After configuration, http://[ip]/phpldapadminyou can access it by typing in the browser . Note that you need to open port 80 or close the firewall

Written by UndercOde
▁ ▂ ▄ u𝕟𝔻Ⓔ𝐫Ć𝔬𝓓ⓔ ▄ ▂ ▁