Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am toying with Apache and FreeBSD.

I'm using UserDir in Apache, and configured it to look at the 'www' dir under each user's $HOME.

My question is: which is the best way to automatically create the 'www' dir for each user while adding them (adduser)?

Is there an option in adduser cmd that I am missing? Or maybe should/can I edit it?

Thank you!

share|improve this question
up vote 12 down vote accepted

there is a -k command line option but there is a better way to do this. Each user's home directory is initialize from /usr/share/skel. If you create there www directory then each newly created user will have it.

share|improve this answer
True! Shame on me for haven't thought it first:) Thank you! – gbr Oct 5 '10 at 11:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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