ldapsearch -x -b ou=Groups,dc=xxxx,dc=org | grep dn | grep "-" | awk -F":" '{print $2}' > delete.ldif
ldapdelete -D cn=Manager,dc=xxxx,dc=org -w secret -f delete.ldif
ldapsearch -x -b ou=Machines,dc=xxxx,dc=org | grep dn | grep -v "UAT," | awk -F":" '{print $2}' > delete.ldif
echo dc=PROD,ou=Machines,dc=xxxx,dc=org >> delete.ldif
echo dc=UAT,ou=Machines,dc=xxxx,dc=org >> delete.ldif
ldapdelete -D cn=Manager,dc=xxxx,dc=org -w secret -f delete.ldif
ldap常用命令
最新推荐文章于 2023-09-02 19:01:50 发布