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 have an LDAP and Samba server (Centos 5.8) at server A and I'm trying to migrate all homedirs to server B, leaving all authentication in server A.

I really don't know how to do when creating a new user in server A and make him/her appear automatically in server B with homedir ready, and I really don't figure how to do this.

Could you send me some ideas?

Thanks in advance!


share|improve this question
up vote 0 down vote accepted

You can use the PAM plugin 'libpam-mkhomedir' to create an account (and pre-populate with configuration files from /etc/skel) at the time of first login of the user.

share|improve this answer

Mount homedir directory (from server B) on server A and use it as it was before the migration to create the home of the new user. If you are using LDAP authentication, the new user doesn't need to be in B local users.

Obs: if when sharing the homedirs you are using squash_root option to not allow the local root to become root on the mounted shared directory (which is a good idea regarding security) or if you are using kerberos authentication (good idea too), your root user from A won't be able to access the mounted homedirs from B so you will need to use an LDAP (or samba not sure how you manage your users) kind of "Domain Admin" user (with full access on the homedirs share) to create the home of the new user.

share|improve this answer

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.