Gentoo Wiki



This is a guide that will describe how to auto-mount Samba shares when your window manager is started by the use of FUSE. It was adapted from


I will assume you already have Samba set up correctly, if not, go to Samba. Make sure, you have File systems/Filesystem in Userspace support enabled in your kernel:

Linux Kernel Configuration: Kernel Configuration
 File System --->
  <M> Filesystem in Userspace support

Then unmask fusesmb:

echo "net-fs/fusesmb ~*" >> /etc/portage/package.keywords

Now you will need to install FUSE: emerge fusesmb. This should pull in all the depends.

You need to add it to the default runlevel by running: rc-update add fuse default

Create a directory to mount your network to, such as /media/network or /mnt/network. To do this, as root type mkdir /media/network Note: I used /media/network for mine, if you decide not to use this, replace all instances of /media/network with what you decided to use.

You will need to make this folder readable and writable by the user you intend to log into, so you need to change the ownership of the folder, as root type chown <username> /media/network, the Ubuntu article I found says to make a group called fuse too and use <username>:fuse instead, I'm not sure if this is necessary though.

Next you will need to make it autorun when you log in, so under XFCE 4.4.0 navigate to XFCE Applications -> Settings -> Autostarted Applications, Click Add and use which ever Name and Description you wish, for the command use fusesmb /media/network and then hit Okay

For XFCE that is not 4.4.0 do: First make the folder for autostart mkdir ~/Desktop/Autostart Create a script to do the command

File: ~/Desktop/Autostart/fuse
fusesmb /media/network

Finally make it executable chmod +x ~/Desktop/Autostart/fuse

You will need to restart to get fuse to run or just run /etc/init.d/fuse start, as root. That should be it, please inform me if it does not, I'll try to fix it.

If you're in the network with Active Directory then you need to create/edit ~/.smb/fusesmb.conf.

$ cat ~/.smb/fusesmb.conf
username = domain/login
password = yourdomainpassword
timeout = 10
interval = 10


If the error occurs, that running fusesmb.cache results in an empty file ~/.smb/fusesmb.cache, try the following. Run fusesmb.cache --debug and check the debug messages. If the error is munmap_chunk(): invalid pointer, try: emerge samba fusesmb. fusesmb seems to have some glibc problems, but after this reemerge, they seem to be fixed.

Retrieved from ""

Last modified: Sat, 06 Sep 2008 14:10:00 +0000 Hits: 7,808