【问题标题】:OpenLDAP associate existing users to an organization unit (OU)OpenLDAP 将现有用户关联到组织单元 (OU)
【发布时间】:2023-01-09 22:49:46
【问题描述】:

我在 Ubuntu 22.04 上创建了一个 OpenLDAP 服务器,并创建了用户但忘记将它们添加到组织单元 (ou)。我现在如何将它们全部关联到 ou ?
实际的服务器是这样的:

dn=company
    ou=Users
    uid=user1
    uid=user2
    uid=user3
    ...

我想要的是:

dn=company
    ou=Users
        uid=user1
        uid=user2
        uid=user3
        ...

具体来说,我想从这个开始:

uid=user1,dc=example,dc=fr

对此:

uid=user1,ou=Users,dc=example,dc=fr

【问题讨论】:

    标签: ldap openldap ldif


    【解决方案1】:

    其实我只是自己找到了答案。 我只是做了一个 LDIF 文件modify.ldif

    dn: uid=user1,dc=example,dc=fr
    changetype: modify
    add: ou
    ou: Users
    

    然后ldapmodify -x -D cn=admin,dc=example,dc=fr -W -f ./modify.ldif

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多