Does the user that you're trying to create already exist as a local system user?
Are you running smbpasswd as root (or with sudo)?
Have you tried smbpasswd with the -D 1 or -D 2 flag (debug, logs extra info)?
For that matter, is there anything interesting in /var/log/samba/smbd.log (or other logs)?
Is "localhost" one of the allowed hosts in smb.conf? Is smbd on?
Did you try some version of
Code:
smbpasswd -as $username < $password