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.
- First we do a backup in case something bad happen.
- netdom computername <CurrentName> /enumerate
- netdom computername <CurrentName> /add:<NewGoodName>
- netdom computername <CurrentName> /makeprimary:<NewGoodName>
- Restart
- Check all service if OK, after we remove the old name
- netdom computername <NewGoodName> /Remove<CurrentName>
- 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