Samba smbtree Problems

March 31st, 2008

I 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.

Leave a comment