Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Regards

share|improve this question
add comment

1 Answer

up vote 4 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
add comment

Your Answer

 
discard

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.