I've read How to migrate Samba User Accounts to a new linux server? however it doesn't address my situation, or at least not with a solution.
I have a RHEL 5 machine, wood, running Samba, Dovecot, PostFix. I would like to move these services to another machine, stone which is Centos 6. Authentication is done via LDAP and PAM on both machines ( /etc/{passd*,shadow*} files have no user info - which is why the linked question doesn't help as that is what it suggest transfering ).
I have copied /etc/samba/* to the new machine (stone), and wasn't getting user authentication until I did smbpasswd -a user1
this allowed user1 to authenticate from a third, Windows Server 2008, machine however browsing to the users home directory results in a permission denied error. ( Since it probably should be clarified; when connecting to the wood Samba server from the same Server 2008 machine, user home directory is not blocked ).
I can't figure out if the error lies with Samba configuration or LDAP? My question is if coping /etc/samba is sufficient to transfer samba configuration - clearly it doesn't transfer user information.
UPDATE: I started the question before realizing smbpasswd created the new user with a next in line user id ... which didn't match up with the home directory file permissions ... so my question is really how can I transfer all the users from wood to stone and maintain their original passwd/id ? or even just id?
UPDATE 2: I used pdbedit to export/import the users, as was suggested. I get a different error now from the Windows side explaining it couldn't authenticate and that multiple connections with the same users aren't allowed. I stopped the samba service on wood, and did a restart on stone.