好耶!配好了 YubiKey 登录 AD,这下登录 Windows 无需密码了。
主要是根据 https://support.yubico.com/hc/en-us/articles/360015654500-Setting-up-Windows-Server-for-YubiKey-PIV-Authentication 设置 Template 和 GPO 就行。之后去 Manage User Certificate 里 Request,Template 选 YubiKey,会自动从 YubiKey 生成证书并由 ADCS 签署。做完之后就理应可以直接用 YubiKey 进行证书登录了。当然,得提前把根证书写进去。
坑:域控必须有 Domain Controller Authentication Template 签发的证书(我猜是因为它有 Smart Card Logon usage)。在 Server core 上申证书困难,可以用 Get-Certificate -Template "DomainControllerAuthentication -CertStoreLocation cert:\LocalMachine\My 来申,十分方便。(参考 https://support.yubico.com/hc/en-us/articles/360013718060-Troubleshooting-smart-card-logon-is-not-supported-for-your-user-account- 和 https://xdot509.blog/2020/12/21/ldaps-domain-controller-certificates/ )
@yuuta 啥意思呀?最终还是得输入密码?
@mashiro 就,AD 认证可以用密码或者证书。证书私钥在 YubiKey 里,而解锁这个 YubiKey 需要一个 PIN(