跳转到主内容

在 ONTAP 预期使用 Kerberos 时客户端使用 NTLM

Views:
122
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用于

  • ONTAP 9 (所有版本)
  • CIFS / SMB
  • 采用 Kerberos 身份验证的 Windows Active Directory
  • AFF / FAS 系统

问题

当需要 Kerberos 时,客户端正在使用身份验证样式 NTLM。这包括以下情形:

  • 客户端数据包跟踪显示 KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN
  • 在组策略对象 (GPO) 配置为阻止 NTLM 并强制进行 Kerberos 身份验证后,Windows 客户端收到访问失败错误
  • 在 Windows 客户端上运行 klist 显示未获取 CIFS 服务器的 Kerberos 票证
  • 事件查看器记录了 NetApp CIFS 服务器的 NTLM 回退被阻止或 Kerberos 协商失败事件
  • 即使在应用了与 SPN 相关的 GPO 更改后,网络驱动器映射仍继续失败

原因

当客户端联系密钥分发中心 (KDC) 并请求服务的票证时,KDC 会在 CIFS 服务器计算机帐户的服务主体名称 (SPN) 中搜索匹配的主机名、IPv4 或 IPv6。如果没有匹配项,KDC 将返回 KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN,客户端可能会回退到 NTLM。

常见触发器:

  • Active Directory 中 CIFS 服务器计算机帐户上缺少 HOST/<short-hostname>HOST/<FQDN> SPN 条目
  • 驱动器映射使用短主机名(例如,\\sdf\share),但只注册了 FQDN SPN
  • NTLM 通过 GPO 被阻止以强制执行 Kerberos——如果缺少 SPN,Kerberos 将失败,NTLM 回退也将被阻止,从而导致访问完全失败
  • 在不更新 SPN 的情况下重命名集群或 SVM

解决方案

确定用于访问存储的主机名、别名或 FQDN。此主机名必须解析为 SVM 拥有的一个或多个 LIF。将所需的主机名配置为 CIFS 服务器计算机帐户上的 SPN。

步骤 1:列出 CIFS 计算机帐户上的当前 SPN

从具有 Active Directory 权限的已加入域的 Windows 主机:

setspn -L <CIFS-machine-account>

查找HOST/<short-hostname>HOST/<FQDN>条目。如果缺少其中之一,请继续执行步骤 2。

步骤 2:添加缺少的 SPN 条目

使用 -S 开关添加具有重复检查的 SPN:

setspn -S HOST/<short-hostname><CIFS-machine-account>
setspn -S HOST/<FQDN><CIFS-machine-account>

步骤 3:刷新客户端 Kerberos 缓存并验证

请留出几分钟时间进行 Active Directory 复制,然后从 Windows 客户端执行以下操作:

klist purge
net use * /delete
net use \\<server>\<share> /persistent:yes
klist

klist 输出应显示 cifs/<FQDN> 的 Kerberos 票证。

注意:使用 IP 地址的驱动器映射将始终回退到 NTLM。Kerberos 需要主机名或 FQDN — 请相应地更新驱动器映射。

合作伙伴备注

合作伙伴备注文本

追加信息

要使用 SPN 的 IP 地址,有一些要求,但过程与 Microsoft 概述的类似 — Syntax for setspn CLI command

要从 ONTAP 确认每个已连接客户端的身份验证方法:

vserver cifs session show -fields auth-mechanism

要确认 CIFS 服务器名称与 setspn 使用的计算机帐户匹配:

vserver cifs show -vserver <svm-name>

内部参考

内部参考文本

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.