Was addicted various after you upgrade the OS of an old Samba server. Put It also was using a set of 2.x era become 3.x are seems to the have emerged.
Changes in 3.x
Format and location of the password file have been modified in 3.x.
/etc/smbpasswd /var/lib/samba/passdb.tdb
Also pdbedit command is provided for the administrator. And though it must have administrator privileges, and powerful general-purpose, than SMBPASSWD.
Check the setting
By extracting a set of smb.conf in Testparm command to confirm that the Tdbsam are specified in the authentication DB.
% testparm -s /etc/samba/smb.conf ... passdb backend = tdbsam ... %
I make Passdb.tdb from the old smbpasswd file
Copy Smbpasswd.bak to work for in The/etc and/var/backups.
% sudo cp /etc/smbpasswd.bak /var/lib/samba/smbpasswd.txt
I to convert Pdbedit.
% sudo pdbedit -i smbpasswd:/var/lib/samba/smbpasswd.txt \ -e tdbsam:/var/lib/samba/smbpasswd.tdb
Retry fix the problem and get an error. This is simply remove the bad line.
% sudo vi /var/lib/samba/smbpasswd.txt (remove invalid users) % sudo rm /var/lib/samba/smbpasswd.tdb (try again)
I Replace the password file.
% sudo /etc/init.d/samba stop % sudo mv /var/lib/samba/passdb.tdb{,.bak} % sudo mv /var/lib/samba/{smbpasswd,passdb}.tdb % sudo /etc/init.d/samba restart
To test if you can logon.
% smbclient --debuglevel=3 //192.168.0.x/jdoe -U jdoe (jdoe‘s smb password) smb: \> exit %
Troubleshooting
Really sure the user is registered.
% sudo pdbedit -u jdoe -v
To register it if it's not registered.
% sudo pdbedit -a -u jdoe
Reference
It:whole Picture Revised version of Samba 3.0 [Part II] (3/3)/Takahashi Motonobu support of a variety of authentication Database
Http://www.atmarkit.co.jp/flinux/special/samba3b/samba06.html
Migrating authentication of Samba from SMBPASSWD to TDB