如何从 LDAP 容器中删除用户
How to delete a user from the LDAP container
我需要从 LDAP 容器中删除一个用户。
首先,我使用 :
搜索用户
$ ldapsearch -x -b "dc=tuleap,dc=local" -s sub "objectclass=*"
我找到了用户然后我执行了:
$ ldapdelete -v -D "uid=user,dc=tuleap,dc=local" -w userpassword
我明白了:
ldap_initialize( DEFAULT )
ldap_bind: Invalid credentials (49)
任何人都可以帮助解决这个问题。
根据您在评论中的内容,错误 Invalid credentials (49)
来自您为用户提供的不正确 DN:
uid=user,dc=tuleap,dc=local
而不是 uid=user,ou=people,dc=tuleap,dc=local
现在对于命令的语法,您必须指定要从目录中删除的条目。
来自文档:
If one or more DN arguments are provided, entries with those
Distinguished Names are deleted. Each DN should be provided using the
LDAPv3 string representation as defined in RFC 4514
例如:
ldapdelete -v -D "uid=user,ou=people,dc=tuleap,dc=local" -W "uid=user2,ou=people,dc=tuleap,dc=local"
这将尝试删除条目:uid=user2,ou=people,dc=tuleap,dc=local
感谢您的回复,
经过长时间的研究,我找到了解决方案,
首先我使用 ldapsearch
搜索用户
ldapsearch -x -b "uid=user,ou=people,dc=tuleap,dc=local" -s sub "objectclass=*"
之后我使用 ldapdelete
删除了用户
ldapdelete -v -c -D "cn=Manager,dc=tuleap,dc=local" -w ladap-manager-password "uid=user,ou=people,dc=tuleap,dc=local"
正在执行 tuleap]# cat .env 我找到了 ladap-manager-password
希望对和我有同样问题的人有所帮助
我需要从 LDAP 容器中删除一个用户。
首先,我使用 :
搜索用户$ ldapsearch -x -b "dc=tuleap,dc=local" -s sub "objectclass=*"
我找到了用户然后我执行了:
$ ldapdelete -v -D "uid=user,dc=tuleap,dc=local" -w userpassword
我明白了:
ldap_initialize( DEFAULT )
ldap_bind: Invalid credentials (49)
任何人都可以帮助解决这个问题。
根据您在评论中的内容,错误 Invalid credentials (49)
来自您为用户提供的不正确 DN:
uid=user,dc=tuleap,dc=local
而不是 uid=user,ou=people,dc=tuleap,dc=local
现在对于命令的语法,您必须指定要从目录中删除的条目。
来自文档:
If one or more DN arguments are provided, entries with those Distinguished Names are deleted. Each DN should be provided using the LDAPv3 string representation as defined in RFC 4514
例如:
ldapdelete -v -D "uid=user,ou=people,dc=tuleap,dc=local" -W "uid=user2,ou=people,dc=tuleap,dc=local"
这将尝试删除条目:uid=user2,ou=people,dc=tuleap,dc=local
感谢您的回复,
经过长时间的研究,我找到了解决方案,
首先我使用 ldapsearch
ldapsearch -x -b "uid=user,ou=people,dc=tuleap,dc=local" -s sub "objectclass=*"
之后我使用 ldapdelete
ldapdelete -v -c -D "cn=Manager,dc=tuleap,dc=local" -w ladap-manager-password "uid=user,ou=people,dc=tuleap,dc=local"
正在执行 tuleap]# cat .env 我找到了 ladap-manager-password
希望对和我有同样问题的人有所帮助