Har*_*ley 5 ldap mac-osx-server opendirectory
我有一个 Open Directory 用户在 Workgroup Manager 中未选中“访问帐户”框,因此他们无法登录。有没有办法使用 LDAP 查询来确定这一点?
能够/bin/false
通过 LDAP检查他们的登录外壳设置也很好,因为一些管理员使用它来禁用登录。
是否禁用帐户不存储在 LDAP 数据库中,因此您无法通过任何 LDAP 查询获得;它在密码服务器数据库中,因此您需要查询密码服务器。为此,您首先需要获取帐户的密码槽 ID,该 ID 将位于 LDAP 的 authAuthority 属性之一中,如下所示:
authAuthority: ;ApplePasswordServer;0x4ae508585b4ac9840000000500000005,1024 35
1484429831226030758363098280788558407709702186716704057921377682138163682495133
1971257473356121601282837516549920614867084718242948054970731529476886852497051
1771493871066923475105955010041662310891335912128945258881795910315183596873989
2049755102190782235854169470422244680045551515607049216054651273928793669
root@myserver.example.com:10.0.0.5
Run Code Online (Sandbox Code Playgroud)
在本例中,“0x4ae508585b4ac9840000000500000005”是用户的密码槽ID。完成后,您可以连接到密码服务器并检查用户的密码策略:
$ telnet 10.0.0.5 3659
Trying 10.0.0.5...
Connected to myserver.example.com.
Escape character is '^]'.
+OK ApplePasswordServer 10.6.0.0 password server at 10.1.0.1 ready.
getpolicy 0x4ae508585b4ac9840000000500000005
+OK isDisabled=1 isAdminUser=0 newPasswordRequired=0 usingHistory=0
canModifyPasswordforSelf=1 usingExpirationDate=0 usingHardExpirationDate=0
requiresAlpha=0 requiresNumeric=0 expirationDateGMT=44451553867008
hardExpireDateGMT=44451553900288 maxMinutesUntilChangePassword=0
maxMinutesUntilDisabled=0 maxMinutesOfNonUse=0 maxFailedLoginAttempts=0
minChars=0 maxChars=0 passwordCannotBeName=0 requiresMixedCase=0
requiresSymbol=0 notGuessablePattern=0 isSessionKeyAgent=0 isComputerAccount=0
adminClass=0 adminNoChangePasswords=0 adminNoSetPolicies=0 adminNoCreate=0
adminNoDelete=0 adminNoClearState=0 adminNoPromoteAdmins=0
quit
+OK password server signing off.
Connection closed by foreign host.
Run Code Online (Sandbox Code Playgroud)
请注意该列表中的“isDisabled=1”策略,表明该用户当前已被禁用。
归档时间: |
|
查看次数: |
2169 次 |
最近记录: |