I have accidentally typed my name wrong when I created the administrator account. Although I managed to change the user name at the login screen, I am unable to rename the
/home/newusername. I tried most of the online tutorials, and it failed.
The code I tried was this:
usermod -l newusername -m -d /home/newusername oldusername
But the output is:
cannot lock /etc/passwd; try again later.
How can I fix the issue and change the folder to newusername and expect all the applications to work as before?