Introduction

Note that "fusesmb" has several outstanding bug reports from people who find that it leaves an empty directory with no contents, and that its "fusesmb.cache" file never gets written. An alternative to "fusesmb" that operates in much the same way but that actually works under the most recent Ubuntu versions (including 10.04) is the "smbnetfs" project, which can also be installed from the Ubuntu package repository.

Note that under hardy (8.04) Many people have been having issues with the kde and gnome file manager browsing samba shares, and fusesmb also seems to be affected

If you experience such problems , please file a bug report

As an alternative one may wish to try the smb4k tool, it provides a gui method to scan and mount shares

FUSE : Filesystem in Userspace; With FUSE it is possible to implement a fully functional filesystem in a userspace program. Homepage is http://fuse.sourceforge.net/

fusesmb is a specific fuse tool that allows easy access to the shared folders on a network. Its main advantage over mounting shares manually is its flexiablity in the settings, and how it auto updates and finds new shares as they appear on the network.

Terms often used

Directory and folder mean the same thing. Old time linux users normally use the term directory.

Installing fusesmb

*note* i have not taken notes on what is needed from a totaly new/clean ubuntu install. Its possible i missed some packages. If so please help make these pages better by editing them, or leaving me a note.

This will install fusesmb and probably also some other related packages like fuse-utils and libfuse2, which are required.

You need to have the kernel-module named "fuse" loaded in order to use fusesmb. To load this module simply type:

sudo modprobe fuse

Remember, this module must be loaded every time you intend to use fusesmb. If you want to have this module always loaded you must edit the file /etc/modules and add the line fuse to the bottom line.

Now we have to set up permissions to use fuse. This is done in two steps. First add your user to the group fuse by typing:

sudo adduser <your login username> fuse

So for example if your login-name is bgates you should type

sudo adduser bgates fuse

In most cases you will need to log out and log in again for the changes to take effect. The users group settings are only read at login. As an alternative you could ssh in or perhaps login with a different login shell. But its easiest to just logout and back in.

Setting the default .smb/fuse.conf settings file

the fusesmb tool reads its default settings from the .smb/fuse.conf file. This file is not created automaticially, however there is a example file one can copy and edit.

In order to create a .smb/fuse.conf file for the user use the following commands.

Summery of what the above does. Makes a directoy in the users home dir called .smb, then copies the example file to it. renaming it to fusesmb.conf, then sets the proper secure permissions for the file. Then edits the file so the user can make the changes needed to make a working config file.

If you want to make it so that every new user created has a existing .smb/fusesmb.conf file You can set that up by making changes to the /etc/skel directory.

editing the smbfuse.conf file

The ~/.smb/fusesmb.conf is a text file that defines what password and users to use for the various shares that may be found on the network. It can be edited with any text editor.

Comments are began with a ; different sections are began with [NAME] Most of the file is comments, to help document the various options aviliable.

A very basic (and about all one needs in many cases) fusesmb.conf file is as follows.

Using smbfuse

To actually access the shares one must now mount the fusesmb filesystem to an existing directory

First Create a Directory to Mount the smbfuse to. Make it with your favorite file manager or from the command line. In this case we are making the directory named "Network" in the users home directory.

mkdir ~/Network

Next do the actual Mounting of the fusesmb to the directory. From the home directory do the following.

fusesmb Network

Note: for some odd reason fusesmb prints out 'test' - I am not sure where this is coming from.

Test the Fusesmb.

cd Network
ls -R

You should be able to browse the whole Network and any shared files on the network. Congratulations!

unmounting the fusesmb share

fusermount -u Network

Should allow unmounting.

Auto Starting/AutoMounting the fusesmb tool at login

I am unsure of the proper way to make the system start. Different windowmanagers and desktops have vastly different ways of autostarting programs. Each method has issues.

Trying to remount the fusesmb to an allready mounted fusesmb directory will generate a warning, which is an annoyance, but causes no real problems. It would be best to check to see if your selected directory ("Network" in our examples) all ready contains files. or is some otherwise allready the mounted with fusesmb.

With Kde

One can create scripts in the ~/.kde/Autostart folder and they will get ran at login to the kde desktop.

~/.kde/Autostart/startfuse

fusesmb /home/USERNAME/Network

Be sure to make the script executable.

With Gnome

system->preferences->sessions Select new

Name: startfuse

command: fusesmb /home/YOURUSERNAME/Network

With XFCE

Settings->Settings Manager->Autostarted apps Select add

Name: startfuse

command: fusesmb /home/YOURUSERNAME/Network

With Just the Console

* Work in progress *

one could put the proper command in the .bash_profile This would most likely also get the Network mounted for kde and gnome as well.

Possible problems and things to watch out for

It may be for the Best to not autostart the mounting of fusesmb, given how common various 'indexing' tools are these days. The various media players, and programs like Picassa, strigi, and other search tools may be running in the background and cause more network load then you want.

Since You have setup "Network" to appear as a local directory, any sort of search tools, like locate, and updatedb, may try to index the whole network that it can reach. This can result in you searching EVERY share on every Machine on the network, or at least attempting to.

Specific Search tools Tweaks

Untested - You should be able to edit the /etc/updatedb.conf file and add "fuse.fusesmb" to the end of the 'export PRUNEFS' option. Or you could set the /home/USERNAME/Network directory in the PRUNEPATHS setting of the updatedb.conf file.

Other search tools like strigi, and so forth need to be set differently.

Using the find command on the network shares have on accasion given me some odd errors.

Other information and documentation worth reading

The fusesmb man pages (very minimal). The fusesmb homepage and docs. (see below) The man pages for the various FUSE utilities The FUSE Homepage (See Below).