Messed up my user profile :( help

Asked by StoneEagle

When installing Unbuntu, I used adam1 as the user and everything was working great. I decided I wanted a different user name so in Users and Groups I changed the name there along with the home directory so that it would reflect my new name instead of the adam1. I now realize what I did since I can't get back in. The only access I have at the moment is the command line. Is there a way to fix that directory setting for the admin through the command line? Any help would be most appreciated, otherwise I guess I will need to reinstall.

Thank you

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Clóvis Fabrício (nosklo) said :
#1

login in command line and do (dont forget to use your new user name instead of NEWUSERNAME):

cd /
sudo usermod NEWUSERNAME -d /home/adam1

that will change directory configuration of the new user name back to old directory.

Then you can do if you wish:

sudo usermod NEWUSERNAME -d /home/NEWUSERNAME -m

That will change home directory to the new username directory, but moving the directory contents. That way you can change the directory and still login.

Can you help with this problem?

Provide an answer of your own, or ask StoneEagle for more information if necessary.

To post a message you must log in.