User Profile Service service failed the logon. User profile cannot be loaded

Most people who work in a windows environment for some time will have seen profile corruption before where a single user cannot log in or looses settings with the fix often being to log on as someone else and remove the profile completely allowing a new working profile to be created or restoring from a backup.  But what about when no one can log in including new users?  I recently came across this problem where a server gave everyone who attempted to log in, including new users a “User Profile Service service failed the log in. User profile cannot be loaded” message.

Profile error message

Everything else was working correctly, I could remotely stop and start services, browse administrative shares and even open the registry.  The culprit turned out to be bad permissions on the default user profile.
To fix, make sure you have turned on show hidden files and folders and also unticked “Hide protected operating system files” on the computer you are connecting from.

unhide files and folders

Next, browse to the administrative C: drive share on the computer which fails all log ons:  \\computername\c$\users\ and right click on “default” and then on “properties”

Next click on the “Security” tab at the top and then on the “advanced” button at the bottom. (You should see the window below)

Advanced Permissions

Next, click on “Change permissions” and then tick the box next to “Replace all child object permissions with inheritable permissions from this object” and then on OK.  This should re-apply the permissions on this folder and permit profiles to be re-created again.

replace child permissions with inheritable