Just in case anyone else is pulling their hair over Ubuntu regularly/automatically changing/reverting passwords set with smbpasswd:
ubuntuforums.org/archive/index.php/t-1065675.html
If you don’t want passwords changed by any other means than smbpasswd, uninstall libpam-smbpass and disable “unix password sync” in /etc/samba/smb.conf.