Ubuntu – How to change the default parent directory for a new users home folder

defaulthome-directorymultiple users

I'm mostly asking this as it's apart of an assignment that asks me to.

"configure the default settings of linux for when you create a new user, their home directories are in /project/users directory by default."

I've already figured out how to set other automatic standards that are requested except this one. I have looked around the /etc/xdg directory and was further baffled by /etc/skel. I have googled the nine lives out of it and searched with a number of different wordings how to do it on this site. If it has been covered already, refer me to it and I will delete this question. Thank you for your help every one.

Best Answer

  • To change the location where a newly created user will have his /home directory reside. You'll have edit /etc/default/useradd and change the HOME=/home to HOME=/directory/you/want/it/to/be

    You'll need finger to verify that this worked:

    $ sudo apt-get install finger

    then follow up with:

    $ gedit /etc/default/useradd

    useradd defaults file:

    HOME=/home [configure as desired]