To add a new user in samba, with Samba setup as a domain controller, run the following:
net rpc user add tom -U root net rpc user password tom "secret" -U root smbpasswd -e tom