How to Add an AD Account for Log On as a Service Without Removing Others?
Asked by
recipe.page.six
I'm trying to figure out the best way to add an Active Directory account to the 'Log On as a Service' setting in local security policy without overwriting or removing the existing entries. I've only used Group Policy Object (GPO) for this before, but it tends to override all other accounts, and I don't want to lose the current settings across our servers. I found a PowerShell solution but haven't quite mastered how to deploy it en masse yet. How do you all handle this?
Answers
We mostly stick with gMSA accounts. They improve security since there's no password management hassle involved. Itโs a great choice if your AD is up-to-date!
Reply to this answer
And donโt forget to add the account to the deny logon interactive policy to keep everything secure!
Reply to this answer
Combining GPO defaults with your custom accounts works best. If you have specific machines in mind, you can use the userWorkstations option for limits. If your Active Directory setup allows, consider using gMSA (Group Managed Service Accounts) or dMSA (Dedicated Managed Service Accounts) for even better security!
Reply to this answer
Using GPO, you can add your required accounts along with the default values that you need. Just make sure you have a GPO that already forces the default values. This way, you won't wipe everything outโreally helps avoid that dreadful moment when you realize you've locked out half your service accounts!
Reply to this answer
Add your answer
Answers are reviewed before publication.
dpi.300scan: Exactly! A lot of folks miss that you can just extend the defaults in the GPO instead of starting from scratch. It makes a huge difference.
quillcase: Thatโs interesting, though. Iโve noticed different defaults on our servers too. We have around 200 machines, and I've spot-checked a fewโturns out they all have different configurations!