Moved home directory in ubuntu and now I can't boot?

So, here is the story.

While trying to set up a samba server, I was experimenting in the terminal (noob to linux, though I hope to get better) and I was trying to use the 'mv' command to move an edited file into the etc/samba folder. What ended up happening was, i copied the whole home directory. So I restarted, and after trying to login I got a large amount of errors, ending with no ubuntu.

First question, how do you suggest I go about fixing this?

Second question: how do i properly use the mv command.

Thanks,

lots of rep for someone that can help

Update:

Yea, i did move the /home/ directory into the /etc/samba directory and i cant login because it can't find the file to authenticate or whatever.

Is there any other way to do it without reinstalling the operating system? If i ran a version of of ubuntu off of a flash drive could i access the terminal from there and change it?

if so how do i correctly type the mv command to fix it

2 Answers

Relevance
  • Anonymous
    9 years ago
    Favorite Answer

    The easiest way is to boot from the CD, mount the hard drive you installed linux on and move the directory back.

    Depending on the distribution CD you use to boot (it doesn't have to be the same one you installed) you should be able to use a file manager to do all this.

    The second part of your question is simple "mv a b" which renames the file from a to b , remember that a directory is a file. If you want to find out more read up on inodes and commands like mv, rm and ln.

  • SteveO
    Lv 7
    9 years ago

    Did you move the home directory into the samba directory? If that's the case, log in as root and move it back. If that doesn't work then just reinstall your entire system.

Still have questions? Get your answers by asking now.