System Preferences locked After Username Change
Have a backup, then:


Create a new administrator account by re-running the setup assistant. You can do this by deleting /var/db/.AppleSetupDone from single-user mode. 
See I don&#39;t have administrator account on my mac
Delete your existing user account from System Preferences, keeping the home folder.
Rename the home folder with the new username you want to use if you haven’t already done so.
Create a new user account with the correct username. You should be prompted to use the existing home folder you renamed:


  The Users folder already contains a folder with the same name as the home folder for this account.