eryajf / go-ldap-admin

🌉 基于Go+Vue实现的openLDAP后台管理项目
http://ldapdoc.eryajf.net
Apache License 2.0
1.53k stars 259 forks source link

🐛 按照文档的生产方式部署 使用中报错 #297

Closed StarGods closed 8 months ago

StarGods commented 8 months ago

您使用的版本? | Your usage version?

0.5.15 版 2023-11-12

您使用的场景? | Your usage scenarios?

操作 web页面修改用户,

您做了什么操作? | What did you do?

修改用户

您遇到了什么问题? | What are your problems?

您期望的结果是怎样的? | What is your expected outcome?

部署环境

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" Docker version 24.0.7, build afdd53b mysql Ver 8.0.35 for Linux on x86_64 (Source distribution) osixia/openldap:1.5.0 0.5.15 版 2023-11-12

部署步骤

使用 docker 部署 osixia/openldap:1.5.0


version: "3.7"
services:
  openldap:
    image: osixia/openldap:1.5.0
    restart: always
    hostname: xx.xxx.com
    env_file: /opt/ldap/open-ldap/ldap.env
    ports:
    - 636:636
    volumes:
    - type: bind
      source: /opt/ldap/open-ldap/certs/
      target: /container/service/slapd/assets/certs/
    - type: volume
      source: slapd-config
      target: /etc/ldap/slapd.d
    - type: volume
      source: slapd-db
      target: /var/lib/ldap     
volumes:
  slapd-config: {}
  slapd-db: {}     

 /opt/ldap/open-ldap/ldap.env

LDAP_ORGANISATION=test
LDAP_DOMAIN=xxx.xxx
LDAP_ADMIN_PASSWORD=xxxx
LDAP_TLS_CRT_FILENAME=fullchain.cer
LDAP_TLS_KEY_FILENAME=xxxx.key
LDAP_TLS_CA_CRT_FILENAME=ca.cer
LDAP_TLS_VERIFY_CLIENT=try

部署完成后 将init.ldif 文件传入 openldap 的docker容器 手动导入

go-ldap-admin 配置。


# # ldap 配置
ldap:
  # ldap服务器地址
  url: ldap://192.168.123.103:388
  # ladp最大连接数设置
  max-conn: 10
  # ldap服务器基础DN
  base-dn: "dc=eryajf,dc=net"
  # ldap管理员DN
  admin-dn: "cn=admin,dc=eryajf,dc=net"
  # ldap管理员密码
  admin-pass: "123456"
  # ldap用户OU
  user-dn: "ou=people,dc=eryajf,dc=net"
  # ldap用户初始默认密码
  user-init-password: "123456"
  # 是否允许更改分组DN
  group-name-modify: false
  # 是否允许更改用户DN
  user-name-modify: false

65912868 conn=1001 op=83 SEARCH RESULT tag=101 err=0 nentries=2 text=
65912868 conn=1010 op=38 SRCH base="dc=eryajf,dc=net" scope=2 deref=0 filter="(|(objectClass=organizationalUnit)(objectClass=groupOfUniqueNames))"
65912868 conn=1010 op=38 SRCH attr=DN
65912868 conn=1010 op=38 SEARCH RESULT tag=101 err=0 nentries=6 text=
65912868 conn=1011 op=38 SRCH base="dc=eryajf,dc=net" scope=2 deref=0 filter="(|(objectClass=inetOrgPerson)(objectClass=simpleSecurityObject))"
65912868 conn=1011 op=38 SRCH attr=DN
65912868 conn=1011 op=38 SEARCH RESULT tag=101 err=0 nentries=2 text=
659128c7 conn=1010 op=39 MOD dn="uid=xking,ou=people,dc=eryajf,dc=net"
659128c7 conn=1010 op=39 MOD attr=cn sn businessCategory departmentNumber description displayName mail employeeNumber givenName postalAddress mobile
659128c7 conn=1010 op=39 RESULT tag=103 err=21 text=businessCategory: value #0 invalid per syntax
659128e0 conn=1013 op=18 SRCH base="dc=eryajf,dc=net" scope=2 deref=0 filter="(|(objectClass=organizationalUnit)(objectClass=groupOfUniqueNames))"
659128e0 conn=1013 op=18 SRCH attr=DN
659128e0 conn=1013 op=18 SEARCH RESULT tag=101 err=0 nentries=6 text=
659128e0 conn=1001 op=84 SRCH base="dc=eryajf,dc=net" scope=2 deref=0 filter="(|(objectClass=inetOrgPerson)(objectClass=simpleSecurityObject))"
659128e0 conn=1001 op=84 SRCH attr=DN
659128e0 conn=1001 op=84 SEARCH RESULT tag=101 err=0 nentries=2 text=
659128e0 conn=1011 op=39 SRCH base="dc=eryajf,dc=net" scope=2 deref=0 filter="(|(objectClass=organizationalUnit)(objectClass=groupOfUniqueNames))"
659128e0 conn=1011 op=39 SRCH attr=DN
659128e0 conn=1011 op=39 SEARCH RESULT tag=101 err=0 nentries=6 text=
659128e0 conn=1010 op=40 SRCH base="dc=eryajf,dc=net" scope=2 deref=0 filter="(|(objectClass=inetOrgPerson)(objectClass=simpleSecurityObject))"
659128e0 conn=1010 op=40 SRCH attr=DN
659128e0 conn=1010 op=40 SEARCH RESULT tag=101 err=0 nentries=2 text=

可以正常 添加用户 却无法修改用户。

image

eryajf commented 8 months ago

您好 @StarGods👋,我已收到您的反馈,我将安排时间考虑您提交的信息并进行回复。-- 这条信息是由自动回复的机器人发出的。

Hello @StarGods. I have received your feedback, and I will arrange time to consider the information you submitted and reply. -- This message is sent by an automatic reply robot.

eryajf commented 8 months ago

看报错是部门的字段有问题,建议你先不要自定义配置部署,而是使用docker-compose下的原有配置进行部署,应该整个流程走通没问题的。

看上去的根本原因大概是缺少了一些openLDAP的初始化数据