将Java应用程序连接到AD服务器时,出现以下错误:
javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 531, v1db1]
我了解错误代码531表示not permitted to logon at this workstation
。
但是,我检查了该特定用户的AD服务器上的Log on to属性,并且它具有我尝试登录的工作站的IP。
我检查了下面的问题并在登录到字段中包含了AD服务器的IP,我现在可以登录了。
Can't get connection with AD from Java code
我的问题是,为什么必须包含AD服务器或域控制器的IP /名称才能工作?
由于
答案 0 :(得分:1)
是否必须将DC添加到帐户的“登录到...”限制,完全100%依赖于将使用它的应用程序以及该特定应用程序是否发送源工作站名称登录请求或者只是发送没有工作站名称的IP。如果它仅发送IP,则源工作站字段将填充DC的名称,这就是必须将DC添加到“登录到...”限制的原因。这种情况最常见于非Windows设备/系统,例如NetScalers。
下面是一个示例安全事件ID 4625,用于使用未添加DC的帐户从netscaler设备登录尝试的“登录到...”限制的帐户列表:
Log Name: Security
Source: Microsoft-Windows-Security-Auditing
Date: 1/27/2014 9:22:36 AM
Event ID: 4625
Task Category: Logon
Level: Information
Keywords: Audit Failure
User: N/A
Computer: AD01.mydomain.com
Description:
An account failed to log on.
Subject:
Security ID: SYSTEM
Account Name: AD01$
Account Domain: MYDOMAIN
Logon ID: 0x3e7
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: netscalersvc
Account Domain: MYDOMAIN
Failure Information:
Failure Reason: User not allowed to logon at this computer.
Status: 0xc000006e
Sub Status: 0xc0000070
Process Information:
Caller Process ID: 0x260
Caller Process Name: C:\Windows\System32\lsass.exe
Network Information:
Workstation Name: AD01
Source Network Address: 192.168.5.5 <- NetScaler's IP, not AD01's IP
Source Port: 64015
Detailed Authentication Information:
Logon Process: Advapi
Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Transited Services: -
Package Name (NTLM only): -
Key Length: 0