Changing usernames will cause unavoidable problems. A lot of programs will try to read and write data from the old directory that's no longer there. Creating a new account and copying over all the old folders seems like a good idea. I believe there are other problems.
But this answers the question where the previous comments did not help me.
Simply logging back in as as root may not work because my old username had active processes. So I did like other's have said and rebooted into recovery mode. But then I got the error message the original poster mentions. As discovered here this is because the drive is read only in recovery mode so you have to make it read-write.
Summary fix:
sudo passwd root # assign a password
reboot # into recovery mode and log in as root
Hold shift during boot if your grub menu is not set to show.
Log in as root and get to shell.
mount -o remount,rw / # make the disk writable
usermod -l <newname> -d /home/<newname> -m <oldname>
passwd -l root # deactivate the root password
reboot
Your old username will be the login name, but it will still let you in. To correct it, edit the file with the command below and look for the line that has your new and old username on the same line and change the old one to the new one:
sudo nano /etc/passwd
As others have said in other places, expect problems when changing your username as many programs will try to do things like find or store application data in your old username's folder which isn't there anymore.