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.

Firstly just want to say that my issue I have is a result of being pretty stupid when it comes to computers and I'm sorry to take up people's time but if anyone could help I would very much appreciate it. My laptop runs Nautilus - Though I was left this computer by someone so I don't really know how to work it.

Anyway, what I wanted to do is change the user name in the log in settings. I thought it was just be pretty simple and straight forward but it wasn't and then what I have actually ended up doing is deleting the home directory that had the old name so now when I start up the computer it no longer starts up properly and I can't log in properly to even try and fix it.

I made a new home folder in the new name and transferred the contents there and then it said 'do you want to delete the old folder - it is ok to do so if you have made a copy in the new folder' or something like that. So I did. (I thought this would just change the name - that's all I wanted to do) Then everything was gone in the original home directory/folder (for instance when I clicked on any files or pictures on the desktop anywhere it said 'not found') and I got really worried all my stuff was gone but then I found a new folder in the new name that I had created somewhere and that had all my stuff in so I know it is still there. I thought then at least I still have my stuff.

Anyway, this was until I turned the laptop off. Now when I try and turn it on I get the following error pop ups in this order:

Could not update. ICEauthorityfile/home/username.ICEauthority

/usr/lib/libgconf2-4/gconf-sanity-check-2 was exited with status 256

Then it says these folders don't exist /home/username/desktop,/home/username/.nautilus You need to create the folders or set permissions or something.

Then it is just a blank background and I can't do anything at all. I can only log out, lock the session, shut down, restart etc. But there is just nothing else there.

Basically, I know this is probably a really stupid problem but I honestly don't know how to work this system so if anyone can help I would be so grateful. I just need to know how I can get back into the computer to get my stuff. I presume I need to recreate the deleted home folder with the old name. Or maybe create the the new folders with the new name?

I honestly don't know. This all probably didn't make any sense. Anyway if anyone can help please let me know.

Thank you so much!

share|improve this question
    
Did you had any files to recover? –  Bruno Pereira Jan 3 '12 at 17:46
    
Hi Bruno, Yes, all my files and pictures etc are on the computer. I don't think they are lost though, I think they have just been moved in to this new folder I made under the new username. I don't have them backed-up anywhere unfortunately. (Which I know is pretty stupid too!) Thanks for your help. –  natalie Jan 3 '12 at 18:11
add comment

3 Answers

The home directory must be recreated, and with the right permissions. This requires that you boot your computer into recovery mode (aka safe mode) when the starts press and hold the left Shift key and select Ubuntu, blah (recovery mode) from the list.

Once you're into the recovery mode in the system you'll see a menu, select "Root - Drop into a root shell prompt". you'll need to use some commands typed in to recover the system so write them down:

mkdir /home/username
chown username:username /home/username

Replace username with the username you need. To confirm that this is the directory you need and that it will work do:

cd ~username

And that's it, type reboot to get out and reboot the computer. Once you're back in your computer's user's desktop, you can go looking for your files; hopefully they've not been deleted as your description makes it sound like they've just been moved somewhere else. Find them and move them back using Nautilus, or if you don't have permission to move the files then use gksu nautilus to give yourself god like powers (be careful!)

share|improve this answer
    
I have just spent ages typing a big long comment with a few questions twice and it won't let me post it and keeps deleting it. :( So I will try and be shorter as it maybe didn't like the length of the comment. In the boot menu now, nothing resembling root command. Options are Cdrom/dvdrom, Hard Drive, Boot from LAN or Enter Setup. Please can you let me know which to select? Thanks so much for your help. –  natalie Jan 3 '12 at 18:52
    
@natalie: see if this answer helps. –  Takkat Jan 3 '12 at 19:43
    
Thanks Takkat, I updated the answer with the right language and link. –  Martin Owens -doctormo- Jan 4 '12 at 20:29
    
@natalie you boot regularly while holding Shift, and then pick recovery mode there, followed by a root prompt. Also, you could try Ctrl+Alt+F1 after booting normally and getting to the logon screen. Sorry for slow response. –  hexafraction Jul 4 '12 at 16:44
add comment

This answer is to help you recover the accidentally deleted files.

I hope you have a ext3 or ext4 filesystem. First thing you might want to do is shut the computer and boot with liveUSB or liveCD and backup the whole filesystem onto another disk.

Now, use ext3grep and and use the --restore-files switch and restore files one by one.

Here is a extensive guide to use ext3grep to recover the deleted files.[1]

  1. http://carlo17.home.xs4all.nl/howto/undelete_ext3.html
share|improve this answer
2  
Because linked stuff has a tendency to good away and be lost on the interwebs it would be nice that you explained on your answer the main points or at least the important details on the linked article, you can always link the article as the source but generally would be better if the information would be written on the answer it self. –  Bruno Pereira Jan 3 '12 at 17:53
add comment

Whats was your File system ? If journal-based recovery tools like ext3grep,extundel doesn't help then recovery can be done via tools like testdisk,foremost,extcarve etc which uses carving concept for recovery.

share|improve this answer
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.