标签:
Was addicted various After you upgrade the OS of old Samba server. Put it also was using a set of 2.x era become 3.x is seems to have emerged.
Format and location of the standard password file has 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.
by extracting a set of smb.conf in testparm command to confirm that the tdbsam is specified in the authentication DB.
% testparm -s /etc/samba/smb.conf ... passdb backend = tdbsam ... %
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 time I was 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 %
Really sure the user is registered.
% sudo pdbedit -u jdoe -v
To register it if it is not registered.
% sudo pdbedit -a -u jdoe
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
标签:
原文地址:http://www.cnblogs.com/linuxbo/p/4289366.html