我们已经使用 freeradius.org 的 pam_radius 模块为 ssh 设置了 Windows NPS 和 RHEL radius 客户端。但在 Linux 客户端上,我看到了错误pam_radius_auth: Got RADIUS response code 3
。/var/log/secure
代码 3 表示Access Rejected
,但在 Windows 客户端上,当我使用 radius 测试工具进行测试时,连接成功并得到代码 2,代码 2 表示Access granted
。在 NPS 日志中,我得到以下内容:
<Event>
<Timestamp data_type="4">07/04/2015 10:21:02.913</Timestamp>
<Computer-Name data_type="1">MYADDomainController</Computer-Name>
<Event-Source data_type="1">IAS</Event-Source>
<User-Name data_type="1">MYlinuxuser</User-Name>
<NAS-Identifier data_type="1">sshd</NAS-Identifier>
<NAS-Port data_type="0">3360</NAS-Port>
<NAS-Port-Type data_type="0">5</NAS-Port-Type>
<Service-Type data_type="0">8</Service-Type>
<Calling-Station-Id data_type="1">MYWindowsClientIP</Calling-Station-Id>
<Client-IP-Address data_type="3">MYMyLinuxRadiusClientNameInNPSIP</Client-IP-Address>
<Client-Vendor data_type="0">0</Client-Vendor>
<Client-Friendly-Name data_type="1">MyLinuxRadiusClientNameInNPS</Client-Friendly-Name>
<Proxy-Policy-Name data_type="1">Use Windows authentication for all users</Proxy-Policy-Name>
<Provider-Type data_type="0">1</Provider-Type>
<SAM-Account-Name data_type="1">MyDomainName\MYlinuxuser</SAM-Account-Name>
<Fully-Qualifed-User-Name data_type="1">MyDomainName\MYlinuxuser</Fully-Qualifed-User-Name>
<Class data_type="1">311 1 MyRadiusServer 07/04/2015 05:14:52 15</Class>
<Authentication-Type data_type="0">1</Authentication-Type>
<Packet-Type data_type="0">1</Packet-Type>
<Reason-Code data_type="0">0</Reason-Code>
</Event>
<Event>
<Timestamp data_type="4">07/04/2015 10:21:02.913</Timestamp>
<Computer-Name data_type="1">MYADDomainController</Computer-Name>
<Event-Source data_type="1">IAS</Event-Source>
<Class data_type="1">311 1 MyRadiusServer 07/04/2015 05:14:52 15</Class>
<Authentication-Type data_type="0">1</Authentication-Type>
<Fully-Qualifed-User-Name data_type="1">MyDomainName\MYlinuxuser</Fully-Qualifed-User-Name>
<SAM-Account-Name data_type="1">MyDomainName\MYlinuxuser</SAM-Account-Name>
<Provider-Type data_type="0">1</Provider-Type>
<Proxy-Policy-Name data_type="1">Use Windows authentication for all users</Proxy-Policy-Name>
<Client-IP-Address data_type="3">MYMyLinuxRadiusClientNameInNPSIP</Client-IP-Address>
<Client-Vendor data_type="0">0</Client-Vendor>
<Client-Friendly-Name data_type="1">MyLinuxRadiusClientNameInNPS</Client-Friendly-Name>
<Packet-Type data_type="0">3</Packet-Type>
<Reason-Code data_type="0">16</Reason-Code>
</Event>
在 NPS 下的 Windows 事件查看器中,我没有看到任何错误。我在 NPS 中遗漏了什么?