5

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.

6

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:

GROUP=100
HOME=/home [configure as desired]
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
  • @Volker Siegel Mr, editor, would you be so kind as to direct me to a clear set of instructions on how to correctly format and style a question and answer. I can't get mine to look like how others are posting theirs – Miphix Sep 14 '14 at 22:11
  • Click the question mark on the top right of the edit box, and then one of the words that appeared. There is also a link to askubuntu.com/editing-help – Volker Siegel Sep 14 '14 at 22:14
  • You are a wise man. Oh, kind sir! – Miphix Sep 14 '14 at 22:21
  • 1
    What does finger do in this answer? – kasperd Sep 15 '14 at 10:17
  • @kasperd allows you to verify that was configured correctly by giving you a list of configurations for the said user – Miphix Sep 18 '14 at 19:04
1

This can be easily done during install, however I'm not sure how to do it on an already installed OS. Basically when you're installing, choose the manual option of partitioning. Place your /home directory elsewhere than the default space. I did this by putting / on my SSD, and putting /home and my swappy data on an HDD for storage. I hope this helps, sorry if I misinterpreted your question.

  • Thank you. So, what you're trying to say is. If I want the home directory to default to /project/users, I have to create a separate home partition and get that folder to mount that partition? The main issue is to keep the admin user have a separate directory from the users directory? I suppose I could always add an alias. – Miphix Sep 14 '14 at 21:49
  • HA, I found it. it's here. – Miphix Sep 14 '14 at 21:52
  • Glad you found a better way of doing it. – Bugattikid2012 Sep 15 '14 at 1:47
  • I'm glad we both learned a better way of doing it xD – Miphix Sep 15 '14 at 3:20

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.