Skip to main content

Konfiguracja kont MSA / gMSA

Na kontrolerze domeny:


Logujemy się na konto w domenie w której chcemy użyć kont gMSA,
Używamy aplikację PowerShell by sprawdzić wersję domeny:

(Get-ADDomain).ForestMode
(Get-ADDomain).DomainMode

A black background with white text  AI-generated content may be incorrect.

Dodajmy główny klucz KDS - Ustawiamy -10 godzin by automatycznie zresetować jego długość życia:

Add-KdsRootKey -EffectiveTime (Get-Date).AddHours(-10)

A computer screen with white text  AI-generated content may be incorrect.

Testujemy poprawność klucza: 

Test-KdsRootKey -KeyId (Get-KdsRootKey).KeyId

A black screen with white text  AI-generated content may be incorrect.

Dodajemy odpowiednie konto:

Ważne Częstotliwość automatycznej zmiany haseł można podać tylko przy tworzeniu konta, domyślnie jest 30dni

New-ADServiceAccount -Name NazwaKonta -DNSHostName NazwaKonta.AktualnaDomena -ManagedPasswordIntervalInDays LiczbaDni

embedded-image-pq88nnng.png

Dla przykładu:

embedded-image-gi9gizxw.png

A screenshot of a computer  AI-generated content may be incorrect.

 Dodajemy grupę która może zarządzać danym kontem i do niej konto komputera  które może skorzystać z naszego konta gMSA

A screenshot of a computer screen  AI-generated content may be incorrect.

Set-ADServiceAccount -Identity "NazwaKonta" -PrincipalsAllowedToRetrieveManagedPassword "NazwaGrupy"

embedded-image-hiywhhm7.png

embedded-image-ykcukyep.png

Na serwerze docelowym:

Najpierw musimy zainstalować przystawki powershell do zarządzania AD:

Add-WindowsFeature RSAT-AD-PowerShell

A screen shot of a computer  AI-generated content may be incorrect.

Resetujemy ticket autentykacji Kerberos:

klist purge -li 0x3e7

A screen shot of a computer code  AI-generated content may be incorrect.

I instalujemy konto:

Install-ADServiceAccount -Identity "NazwaKonta"

embedded-image-y4j5vplh.png

Przykładowy wynik:

A screen shot of a computer  AI-generated content may be incorrect.

I weryfikujemy instalację: 

Test-ADServiceAccount -Identity NazwaKonta

A black background with white text  AI-generated content may be incorrect.

Po tych akcjach konto jest dostępne:

A screenshot of a computer  AI-generated content may be incorrect.

A screenshot of a computer  AI-generated content may be incorrect.

 Na podstawie:

Secure group managed service accounts - Microsoft Entra | Microsoft Learn