Single home directory for Ubuntu 14.04 and Window 7

Discussion in 'Linux' started by paul3200, May 9, 2014.

  1. paul3200

    paul3200 Guest

    Is it possible to have the same home directory for both Ubuntu 14.04 and Windows 7 on /home?
     
  2. pisthai

    pisthai Imperfect Human

    Jul 29, 2009
    7,221
    2,272
    240
    Maybe if you use for both an extra HDD instead the one where the OS's are installed. For that you may could set the system's to use that HDD as Drive A or B (if you didn't use any floppy drive). It would require to edit for both OS the settings and change the permissions etc. Not an easy job, special on Linux!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. EFA11

    EFA11 Avatar Guru

    Oct 7, 2010
    8,719
    6,741
    270
    #3 EFA11, May 9, 2014
    Last edited by a moderator: Apr 20, 2017
    Code:
    sudo usermod -d /path/to/new/home -m username
    This should copy all files from your home directory to "/path/to/new/home"
    This should also update the system file that stores the location of your home directory in (/etc/passwd).

    The path should be to the same folder on your Windows 7 setup.
     
  4. duh

    duh MDL Member

    Jan 20, 2009
    143
    15
    10
    yes possible but certainly not adviseable here is why?
    you need to keep data in-consistence between 2 file systems.
    windows being ntfs or fat or refs and linux can be anything else except those 3.
    may be fat32, but fat32 with root? i have never seen it.
    so your options?
    mount the windows partition using ntfs-3g and edit the fstab so it automounts the
    windows ntfs partition. can you post your /etc/fstab partition?
    and lets assume its mounted in /media or /mnt and the directory is
    /media/windows-disk/Users/<username>/desired-directory then you need to create
    symlink in the /home/<username>/windows-home
    eg
    $ ln -sv /media/windows-disk/Users/<username>/desired-directory /home/<username>/windows-home

    thats option one, option 2,
    you can rsync the windows user home directory to the /home/<username>/windows-home
    $ rsync -avc --progress /media/windows-disk/Users/<username>/desired-directory /home/<username>/windows-home

    i dont know how your /etc/fstab looks like, but if you can paste your etc fstab here?
    then i can adjust the command accordingly, till then i am not editing the commands as code
    since its just a rough guess.

    REMEMBER TO ADJUST THE PERMISSIONS ACCORDINGLY.
    since M$ file permissions is not the same as *nix/Linux file permissions and can give you a
    headache later.

    thanks!
    -paul