From 617b354d03c2c506059c23950d57b9b1c031c0ad Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 28 Jan 2025 23:41:26 +0800 Subject: [PATCH] update --- plugins/ldap/config/ldap.conf | 4 ++-- plugins/ldap/install.sh | 2 ++ plugins/phpldapadmin/conf/config.php | 10 +++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/ldap/config/ldap.conf b/plugins/ldap/config/ldap.conf index 42d42b0db..e83ed0e58 100644 --- a/plugins/ldap/config/ldap.conf +++ b/plugins/ldap/config/ldap.conf @@ -5,8 +5,8 @@ # See ldap.conf(5) for details # This file should be world readable but not world writable. -#BASE dc=example,dc=com -#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 +BASE dc=mw,dc=com +URI ldap://{$IP} ldap://{$IP}:666 #SIZELIMIT 12 #TIMELIMIT 15 diff --git a/plugins/ldap/install.sh b/plugins/ldap/install.sh index 884098f4d..fc7a181bb 100755 --- a/plugins/ldap/install.sh +++ b/plugins/ldap/install.sh @@ -14,6 +14,8 @@ VERSION=$2 # https://juejin.cn/post/7309323953683480588 +# dpkg-reconfigure slapd + # 该命令将在本地服务器上查找并返回在 “dc=bytedance,dc=local” 这个起点(和其下的所有子目录)下,所有 cn 属性有值的条目的详细信息 # ldapsearch -x -H ldap://localhost -b "dc=bytedance,dc=local" "(cn=*)" diff --git a/plugins/phpldapadmin/conf/config.php b/plugins/phpldapadmin/conf/config.php index 0987a48db..fc868e835 100644 --- a/plugins/phpldapadmin/conf/config.php +++ b/plugins/phpldapadmin/conf/config.php @@ -639,6 +639,11 @@ $servers->setValue('server','custom_attrs',array('nsRoleDN','nsRole','nsAccountL $servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID')); */ +$servers->setValue('server','host','127.0.0.1'); +$servers->setValue('server','port',389); +$servers->setValue('login','auth_type','session'); +$servers->setValue('server','base',array('dc=local,dc=com')); +$servers->setValue('login','bind_id','cn=admin,dc=local,dc=com'); /*********************************************************************************** * If you want to configure Google reCAPTCHA on autentication form, do so below. * @@ -649,11 +654,6 @@ $servers->setValue('server','force_may',array('uidNumber','gidNumber','sambaSID' ***********************************************************************************/ -$servers->setValue('server','host','127.0.0.1'); -$servers->setValue('server','port',389); -$servers->setValue('server','base',array('dc=local,dc=com')); -$servers->setValue('login','bind_id','cn=admin,dc=local,dc=com'); - $config->custom->session['reCAPTCHA-enable'] = false; $config->custom->session['reCAPTCHA-key-site'] = ''; $config->custom->session['reCAPTCHA-key-server'] = '';