Today, I've tried to install new samba server and migrate users from old server to new one. If I could found user and password file of samba, then I just copy it, but I could not found. At first, I tried to list users as following:
$ pdbedit -L
tdbsam_open: Failed to open/create TDB passwd [/var/db/samba4/private/passdb.tdb]
tdbsam_getsampwnam: failed to open /var/db/samba4/private/passdb.tdb!
User Search failed!
Fortunately I've get the password file location from this error message.
$ sudo ls /var/db/samba4/private
msg.sock passdb.tdb secrets.tdb
Ok, I've copied it to new server and ...
# cp PATHNAME/passdb.tdb PATHNAME/secrets.tdb /var/db/samba4/private
# pdbedit -L