Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My main account got messed up, as I tried to fix it things went downhills.

  • keyboard mess - tried unity --restore and deleting .gconf2*, fail
  • deleted .* in ~, total havoc. Chromium and Firefox crashes etc.

Now, another user account is fully functioning, but I really want my regular username back.

Is there any way to completely wipe the settings for the messed up account or copy the profile from the functioning user?

share|improve this question
add comment

2 Answers 2

up vote 7 down vote accepted

I would boot into recovery mode an go to the root shell, then do:

Backup old folder:

mv /home/youruser /home/youruser-backup

Create new 'home' folder for youruser

mkdir /home/youruser

Set correct read/write access

chown youruser:youruser /home/youruser

Reboot system

shutdown -r now

That would give you an empty folder for your old default user. You should be able to login and then copy your important files back from youruser-backup to youruser.

share|improve this answer
    
thanks! simple & solid. –  user8302 May 18 '11 at 9:45
    
If you dont feel like booting up (twice) and entering recovery mode you can create a temp user with admin privileges (using GUI: Administration > Users and Groups), logout and login with this user, and then issue the above commands. Logout and youre ready to login with your "reseted" original user :) –  MestreLion Jun 15 '11 at 18:14
add comment

You can remove your old non-working user account, then rename the new working account to the old username, see this question: How do I change my username?

share|improve this answer
    
Would the new user be in the sudoers group? –  sashoalm Jan 2 '13 at 9:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.