Beware, this action is VERY dangerous and might ruin some of your running applications, I tried it first on a virtual machine and then my actual machine and it messed up 2 or 3 apps only, I was lucky as these were easy to fix, here we go (Read the instructions below carefully):
usermod -l newname -m -d /home/newname oldname
Please note that you MUST:
- be logged out from the user that you will change the “username” for
- and make sure all that user’s applications are closed.
Thanks go to prshah for his post here