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

When I create a user with useradd command in centos 5, the home directory is created and its /etc/skel files are copied to that directory but when i give useradd with -doption to some different path to home directory it does not create the skeloton files, like .bachrc, .bash_history etc.

If someone can give a hint so I can resolve this problem. Actually I need to execute some specific command .bashrc file but its not there. I created it manually but stil it does not executed that at time of user login.


share|improve this question
up vote 5 down vote accepted

Skeleton files are only copied when creating a home directory. Try adding the -m option.

share|improve this answer
Yes with useradd -md /home/somedir/home1/ username works! – Toqeer Aug 13 '12 at 12:37

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.