Samba smbtree Problems
March 31st, 2008I don’t use Samba much but tonight I had reason to use the smbtree command. Unfortunately the command returned nothing.
After further investigation using the debug option I see that the reason is that I have no file called /var/lib/samba/unexpected.tdb. The actual debug output is here.
# smbtree -N -d 2 added interface ip=172.16.5.187 bcast=172.16.255.255 nmask=255.255.0.0 tdb(unnamed): tdb_open_ex: could not open file /var/lib/samba/unexpected.tdb: No such file or directory
The last line is repeated about 30 times before the command fails. Looking in /var/lib/samba shows that, as reported, the file does not exist.
$ ls -1 /var/lib/samba/ account_policy.tdb brlock.tdb browse.dat connections.tdb gencache.tdb group_mapping.tdb idmap_cache.tdb locking.tdb messages.tdb netsamlogon_cache.tdb ntdrivers.tdb ntforms.tdb ntprinters.tdb perfmon printing private registry.tdb scripts sessionid.tdb winbindd_cache.tdb winbindd_privileged
Next I tried using yum to remove and reinstall samba but without any luck. This command certainly used to work but that may have been Fedora 7 (I’m using Fedora 8) as, like I said, I haven’t tried this for a while.
Googling for this problem returns many people with the same issue but no solution. At least Fedora 9 comes out soon so maybe it will fix itself by then but this sort of thing that I just can’t solve really bugs me.
April 10th, 2009 at 5:49 pm
Same problem with openSUSE 11.1 which is newer :-/
…
tdb(unnamed): tdb_open_ex: could not open file /var/lib/samba/unexpected.tdb: No such file or directory
…
January 21st, 2010 at 4:24 pm
This is because the netbios daemon isn’t running. You also need to start nmbd (preferably before smbd).
Refer http://www.samba.org/samba/docs/man/manpages-3/nmbd.8.html