I recently got a new laptop and installed SharePoint on it. All was working well until I had to rename my laptop. After renaming my laptop I thought I could remove the farm and rerun the SharePoint Configuration Wizard. After doing so, the wizard kept erroring out on the creation of the config database. The error message that I was getting was:
Intallation Error: System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.
As it turns out, when you remove a farm from a machine, the process does not remove the application pools that SharePoint previously used. The application pools had the identity of the old service account in it so that caused the exception.
After deleting the old application pools the configuration wizard completed succesfully.