Windows Dc Renaming Error

Hi everyone

Today I wanted to talk an issue I seen, it’s not common, but it’s an error that can happen. It’s if you rename a DC like if it’s a normal computer, not the correct way. The problem after is it break your Active Directory Database.

After the reboot you will see that error on the login screen of the DC;

Security database on the server does not have a computer account for this workstation trust relation on domain controller.

To recover you need to use netdom the old way.

Please know it’s an issue with only one DC in a single forest. Don’t do those step if you have other working DC or a bigger forest.

  1. First we do a backup in case something bad happen.
  2. netdom computername <CurrentName> /enumerate
  3. netdom computername <CurrentName> /add:<NewGoodName>
  4. netdom computername <CurrentName> /makeprimary:<NewGoodName>
  5. Restart
  6. Check all service if OK, after we remove the old name
  7. netdom computername <NewGoodName> /Remove<CurrentName>
  8. Restart again.

That should do the trick to revert back to the good name, after that if you want to rename a DC, remember it’s not a good idea, but at that point it’s easier to promote another’s one to do the trick. If you need to keep the old server up, you can make sure you have another DC, and after you demote and re-promote with the good name the DC you wanted to change the name.

Reference for the post


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s