首先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工具是您使用访问活动目录?我想知道我有一个类似的内联网要求。 –