I want to create new user or change one of the current users home directory from /home/user2 to /media/user1/secondary.

I already tried this solution here "How to change the default parent directory for a new users home folder?" but still having the same issue when creating new users (home directory is still created in /home).

Thank you.

  • 1
    If /media is a NTFS filesystem you -can- -not- -do- -that-: ntfs does not let you set the permissions required for /home/. You can only store the directories in /home/$USER/ on a filesystem that is not EXT and you can so that by editing ~./config/users-dirs.dirs.
    – Rinzwind
    Aug 9, 2017 at 23:16
  • @Rinzwind Ahaa.. thank you for this explanation. I actually testing this on my laptop "NTFS" partition before I apply it on the server which have EXT4 partitions. I don't get this part "you can so that by editing ~./config/users-dirs.dirs" .. can you clarify please?
    – Ramez Dous
    Aug 9, 2017 at 23:24
  • open that file with gedit and it will all become clear: Change the directory to a hardcoded version and you can create the directories on that location
    – Rinzwind
    Aug 9, 2017 at 23:51

1 Answer 1

  1. Install Users and Groups by typing this into a terminal window:

    sudo apt install gnome-system-tools

  2. Open Users and Groups

  3. Click on the user you want to move. (Note: You cannot move your own directory. You must do it from another user account that has admin privileges.)

  4. Click the Advanced Settings button.

enter image description here

  1. Type in the admin password

  2. Click on the Advanced tab.

  3. Type the new home directory path in the Home Directory text box.

  4. Click OK

enter image description here

  1. Click the Copy Old Files button, and you are done. I WOULD NOT delete the old directory yet. Verify the new directory is working properly first.

Once you find everything is working good, you can then delete the old directory, if you so choose.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .