Ubuntu: Is it possible to set two different user accounts on different HD or partition?



Question:

I have installed ubuntu in a 20 GB HD, and I have two more HD, (160 GB HD and 80 GB HD). But in order to have my data safe (and more easily configure/change/alternate OS system). I want to set two user in the other two HD, respectly. I can setup a user in a different HD (apart from de system HD), but no idea how to set up the other user in the remaining HD...

I didn´t find how to set the two user in two HD.

Any help? or idea where to find how to set it up?. I would prefer GUI configuration...

Regards!

thanks for your help!


Solution:1

  1. Create a user new user.

  2. Open a terminal.

  3. Move the new user's "home" directory to the partition or hard disk you desire...

    $ sudo mv /home/user_home_dir_name /path_to_new_partition

  4. Create a symbolic link in the /home folder to the user's "home" directory...

    $ sudo ln -s /path_to_new_partition/user_home_dir_name /home/user_home_dir_name

  5. Log out and login as the new user.


Solution:2

Although not an exact match to your situation, this is a solution that can assist you here (previous StackExch answer on the Unix site).

In case it isn't obvious, the slight changes you'll need to make to those steps are as follows (adjust to your particular situation as needed):

  • He uses /home as the mountpoint for the joint partition. You will use /home/USERNAME1 for drive 1 and /home/USERNAME2 for drive 2 instead of a common /home.
    • This will be done using /etc/fstab to ensure the drives are mounted each boot automatically.
  • According to your comment:

    "...(and more easily configure/change/alternate OS system)."

    you plan to possibly re-install or dual-boot your Ubuntu install and use the same files. I've never tried this personally, though I see no reason for it to fail. But let me know how that goes for you :)

  • If your users are already created you'll need to either move the home directories using:

    sudo usermod -d /path/to/drive1/mountpoint USERNAME1  

    or mount the partitions somewhere while using symbolic linking to direct the filesystem to the correct place.

    • I see no point in this considering you can just as easily mount the drive directly to the /home/USERNAME1 directory, skipping the extra middle-man, so to speak.


Solution:3

Note, here is an approach will modify the user's home directory, instead of creating a sym-link to the new location.

  1. Create a user new user.

  2. Open a terminal.

  3. Move the new user's "home" directory to the partition or hard disk you desire...

    $ sudo usermod -m -d /path_to_new_partition/user_name user_name

  4. Log out and login as the new user.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »