目录
1、技术要点
1)独立托管服务帐户(standalone Managed Service Account,sMSA)是一个托管域帐户,它提供自动密码管理、简化的服务主体名称(Service Principal Name,SPN)管理以及将管理委托给其他管理员的能力。此类型的托管服务帐户是在 Windows Server 2008 R2 和 Windows 7 中引入的。
2)默认情况下,sMSA 密码更新频率为 30 天。使用组策略修改其更新频率:
Computer Configuration → Policies → Windows Settings → Security Settings → Security Options
Domain member: Maximum machine account password age
3)sMSA 仅应用于单个服务器。如需多个服务器,则使用 gMSA。
4)sMSA 不能跨域使用。如需跨域使用,则使用 gMSA。
5)不是所有的应用程序可以使用 sMSA。
2、系统需求
1)Windows Server 2008 R2 域功能级别。
2)至少存在 1 台 Windows Server 2008 R2 计算机已安装 Active Directory PowerShell 模块,以创建或管理 MSA。
3)至少存在 1 台 Windows Server 2008 R2 计算机运行或使用 MSA。
4)已安装 KB2494158、KB978836。
3、操作步骤
1)创建根密钥:
Add-KdsRootKey -EffectiveImmediately
Add-KdsRootKey -EffectiveTime ((get-date).addhours(-10))(立即生效)
2)创建 sMSA 账户:
New-ADServiceAccount -Name sMSAService -RestrictToSingleComputer -Enabled $True
注意:如果不使用 RestrictToSingleComputer 参数,在 Windows Server 2012 或以上系统中,默认创建 gMSA 账户。
3)确认 sMSA 账户:
Get-ADServiceAccount -Filter * | where { $_.objectClass -eq "msDS-ManagedServiceAccount" }
4)关联 sMSA 账户到目标服务器:
Add-ADComputerServiceAccount -Identity SVR01 -ServiceAccount sMSAService
5)在 SVR01 服务器的属性中,可以确认其 sMSA 账户:
6)在目标应用服务器中,安装服务账户:
Install-ADServiceAccount -Identity sMSAService
Test-ADServiceAccount -Identity sMSAService
6)在 Services 控制台中,关联服务账户:
注意,密码为空。
参考链接
关于:Group Managed Service Accountshttps://mp.csdn.net/mp_blog/creation/editor/122998813