Ubutnu下OpenLDAP部署

OpenLDAP安装#

Copy
# 安装openldap及相关工具 apt install -y slapd ldap-utils # 配置openldap(slapd) dpkg-reconfigure slapd --------------------------------------------------------------------- │ Omit OpenLDAP server configuration? <No> │ DNS domain name: test.com │ Organization name: test │ Administrator password: mypasswd │ Confirm password: mypasswd │ Do you want the database to be removed when slapd is purged? <Yes> │ Move old database? <Yes> ---------------------------------------------------------------------

PhpLdapAdmin安装#

Copy
# 安装phpldapadmin apt-get install -y phpldapadmin # 配置config.php vim /etc/phpldapadmin/config.php ------------------------------------------------------------------------------------------- $config->custom->appearance['hide_template_warning'] = true; # 隐藏WEB页面template模版 $servers->setValue('server','name','My LDAP Server'); # 服务名,默认即可 $servers->setValue('server','host','127.0.0.1'); # 设置host地址,这里默认 $servers->;setValue('server','base',array('dc=test,dc=com')); # 设置BaseDn $servers->setValue('login','auth_type','session'); # 认证类型,默认即可 $servers->setValue('login','bind_id','cn=admin,dc=test,dc=com'); # 设置Bind用户(WEB登陆界面中会自动填写该用户名) $servers->setValue('auto_number','min',array('uidNumber'=>10000,'gidNumber'=>10000)); # 根据情况修改,默认也可以 ------------------------------------------------------------------------------------------- # 关闭默认站点并重启apache a2dissite 000-default.conf systemctl restart apache2 # 登陆管理页面 http://SERVER_IP/phpldapadmin # 老版本在PHP7以上环境下可能工作异常,存在Bug,可尝试替换最新版: https://github.com/leenooks/phpLDAPadmin # 推荐另外一款LDAP管理工具,LdapBrowser:https://ldapbrowserwindows.com
posted @   Beavan  阅读(48)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示
CONTENTS