Coping Samba users from one server to another is not as difficult as it sounds.
The following steps require root access. pdbedit won’t work as a regular user.

  1. On the source server export the user database.  In this example we use smbpasswd format.
    pdbedit -e smbpasswd:/root/samba-users.backup
  2. Copy the file to the second samba server.
  3. Import the backup into the password database.
    pdbedit -i smbpasswd:/root/samba-users.backup

That’s it.
It should be said, that if you are running multiple Samba servers and you want to have common users and groups, you should really be looking and a centralized user solution.  Samba 3 By Example is a good place to start.