I have changed my username and when I did this,I can not log in with my new user and this error comes in the screen: nautilus could not create the following required folders: /home/"last username"/desktop and /home/'last username'/.nautilus .Also when I press CTRL+ALT+F6 for the command line I can not login with my new username. Although I have still access to Linux by root. My Ubuntu version is 11.04 .
You're going to want to log in as root to do this
Firstly, make sure the home folder of your old username does not exist.
If you see a folder with your old username, issue the command
Then issue the command
If you still can't log in after this, you'll have to edit the /etc/passwd file
I had this problem on RHEL6. It was because I had a gui enabled and I was trying to log in with my domain Id's. I could not get logged in.
Then I did this step
Once the machine is on the domain open the console (not SSH) and log in as root. Click on System>Administration>Authenication. Change the User Account Database to Winbind. (If you do not do this you will not be able to log in.
At this point I was able to get logged in, but this is where I started receiving the Nautilus errors.
I then went back to System>Administration>Authenication. ** Click on Advanced Options and click the Check box beside Create home directoires on the first logon.
This fixed the problem for me and my home drives were created.
Hopes this helps someone.