首先appologies這應該是對服務器故障的,但它是做與PHP一樣,所以我認爲這爲它的最佳地點。PHP,Active Directory中,用戶帳戶控制
我正在創建一些方法來將我們的Intranet與Active Directory集成。其中一種方法會自動在我們的數據庫中搜索新用戶,並在AD中創建用戶帳戶(如果發現新用戶)。
同樣地,如果在數據庫中留下了用戶被標記,它會自動禁用在活動目錄的帳戶。
我一直在尋找從Active Directory中傳遞的屬性,特別是用戶帳戶控制領域。
在microsoft website它指出這下它的屬性列表:
The following table lists possible flags that you can assign. You cannot set some
of the values on a user or computer object because these values can be set or
reset only by the directory service. The flags are cumulative. To disable a
user's account, set the UserAccountControl attribute to 0x0202 (0x002 + 0x0200). In
decimal, this is 514 (2 + 512).
問題 我的問題是,如果我們用上面的例子中,標記記錄作爲用戶(512)和殘疾人(2),這最終使得公元514作爲
在PHP中返回的字段值,我怎麼能提取標誌已標記的記錄呢?例如,如果給出514
,我如何使用PHP來確定它是一個普通的用戶帳戶,並禁用了(2和512)?
例如分成以下:
Flag | Splits into | Flag Meaning
--------+------------------+---------------------------------------------------------
514 | 512 + 2 | Normal User Account + Disabled
522 | 512 + 2 + 8 | Normal User Account + Disabled + Home Directory Required
8389120 | 8388608 + 512 | Password Expired + Normal User Account
我希望你能理解我的問題,但隨時請求確認以上信息。
非常感謝
什麼PHP工具是您使用訪問活動目錄?我想知道我有一個類似的內聯網要求。 –