我需要从ldap找出残疾人士 [英] I need to find out disabled users from ldap
问题描述
我正在尝试使用ldapsearch实用程序来确定是否在ldap中禁用了用户,但到目前为止,我一直没有成功.这就是我到目前为止所得到的
I am trying to find out whether a user is disabled in ldap using ldapsearch utility but I have been unsuccessful so far. This is what i have got so far
ldapsearch -h hostname -D 'Service Account' -b 'basedn' sAMAccountName='disabled user' -w 'password'
# extended LDIF
#
# LDAPv3
# base <basedn> with scope subtree
# filter: sAMAccountName=disabled user
# requesting: ALL
#
# search result
search: 2
result: 0 Success
# numResponses: 1
我甚至用-LLL nsaccountlock尝试过,它什么也没有给我.用户使用随机字符串也是如此. 我需要找出我指定的用户是活动用户还是禁用用户,或者根本不是用户.难道我做错了什么?是否可以使用另一个实用程序来确定用户是否被禁用
I have even tried with -LLL nsaccountlock it give me nothing. Its the same with a random string for user as well. I need to find out that the user that I am specifying whether its an active or disabled user or not a user at all. Am I doing something wrong? is there another utility I can use to determine if the user is disabled
推荐答案
您可以使用查找所有User-Account-Control值为0x00000002的用户
To find all users with the User-Account-Control value of 0x00000002
这篇关于我需要从ldap找出残疾人士的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!