【问题标题】:Can I unlock an Active Directory account programmatically using CFLDAP?我可以使用 CFLDAP 以编程方式解锁 Active Directory 帐户吗?
【发布时间】:2013-10-24 15:46:25
【问题描述】:

我正在编写一个故障单系统。我希望能够制作一个按钮,当我点击它时,它会自动解锁用户在 Active Directory 中的 windows 帐户。

这是否可以使用 CFLDAP 查询轻松完成?

我正在运行 Coldfusion 8。

【问题讨论】:

    标签: coldfusion active-directory ldap ldap-query


    【解决方案1】:

    你需要设置userAccountControl=0

    <cfldap 
      action="modify" 
      attributes="userAccountControl=0"
      server="yourserver"
      dn="your DN information">
    

    【讨论】:

    • 我会试试这个。但是,我注意到大多数用户的 userAccountControl 值是 66048 或 512。这些是最常见的值。我没有看到值为 0。
    • @ColdFusionDude userAccountControl 字段可能有很多不同的含义。有关更多信息,请参阅本文。 How to use the UserAccountControl flags to manipulate user account properties
    • 我实际上找到了一个不同的解决方案。有一个名为 lockoutTime 的属性。当帐户处于正常状态时,此值为 0。锁定的帐户具有更大的数值。我以编程方式将此值设置回零,瞧,帐户已解锁。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多