FuSeMB

What is it:
fusemb is a small daemon which maps Microsoft network hierarchy into Unix filesystem subtree, using libsmbclient to obtain information about entries in the SMB network and FUSE (Filesystem In UserSpace) to allow seamless network browsing using standard Unix ways. fusemb differs from the similar project (SMB for FUSE, http://hannibal.lr-s.tudelft.nl/~vincent/fusesmb/ ) in two major points:
1. fusemb uses C++ instead of Python
2. fusemb supports browsing on three levels (Workgroup/Server/Share) only, and access to shares and below is done via smbmount'ing relevant //SERVER/SHARE into fuse-supported directory.

Latest version: fusemb-0.1

Requirements:
fuse v2.2 with matching libfuse and libfuse-devel
libsmbclient and libsmbclient-devel v3.0.x.
Both required components are most often can be found prepackaged for your distribution.

Installation: As usual with majority of configure-based source packages:

./configure && make && make install
No unusual keys, configure just checks for libfuse and libsmbclient, and nothing fancy.

Configuration:
View fusemb.conf.sample file. Brief format and explanation (somewhat like smb.conf):

[fusemb]            # This is section name. Default settings go into [fusemb]
username = guest    #default username to supply for browsing/ share mounting
password = ""       #default password
options = iocharset=koi8-r,codepage=cp866 # additional options to mount_binary
lazy_browsing = on  #recommended to leave on , setting off slows browsing down (by looking one level deeper)
entry_ttl = 120     #Time between entry refreshes (if entry is accessed twice or more in the specified interval,
                    #it won't be refreshed on second and following reads). Higher value recommended for production usage
mount_timeout = 60  # How long to wait for mounter to return. After this timeout mount failure assumed
mount_binary = /usr/bin/smbmount     #You can try to use cifsmount, since they are argument-compatible
umount_binary = /usr/bin/smbumount   #Although there are no cifsumount, ads unmodified smbumount won't umount mounted share
[/DEVELOPERS/MBT]   # Resource name (/[WORKGROUP[/SERVER[/SHARE]]]) . All specified settings will be inherited by child resources as well
username=user       # Username to connect to specified resources
password=userPassword # And password
                    # Other meaningful options are "options" and "ignore"
[/DEVELOPERS/TUX]
username=test
password=test
[/BFUNKY]
ignore=true         # Ignore some trunk, due to unavailability (poorly-connected/blocked by firewall network segments, 
                    # which announce themselves to the master browser, but unavailable for browsing)

Startup and options:

fusemb -m <mountpoint> -l <debug level> -c <config file path>
defaults are ${HOME}/mnt for the mountpoint, debug level 1 (errors only) , ${HOME}/.smb/fusemb.conf config file

Tips and tricks:
Upon receiving SIGUSR1 fusemb will try to unmount all it's network shares. I have

*/15 * * * * pgrep fusemb >/dev/null && killall -USR1 fusemb
in my crontab to free unused resources (busy shares won't be unmounted, so it's pretty safe).

Bugs:

  • No support for non-iso8859-1 share names. Basically, libsmbclient must recode resource identifiers automatically, according to your smb.conf settings ("dos charset", "unix charset", "display charset") (and it tries to), but... I'm uncertain if I must implement proper conversion in fusemb or leave it to libsmbclient team.
  • Can't find how to distinguish unicode and non-unicode dirents .
  • After successfull mount you'll need to reread directory to access share contents. Fixing this "behaviour" will require to multithread fusemb. Probably will be done in v0.2.

    Bugreports will be read and, if possible, answered if delivered to yarick@it-territory.ru

    With all the best, yarick at it dash territory dot ru