I'm trying to use smbpasswd but it's not working like I expect. I try this:
sudo adduser --disabled-password --gecos "" username
sudo chpasswd < <( echo 'username:testpassword' )
sudo smbpasswd username
The last command is not working with this message:
Failed to find entry for user username
While the user certainly exists, I can log in with it without problems. what can I do to make this work? And why isn't this working as expected?