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!



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.


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.

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.