Note: The upgrade to Samba 4 does not change the procedure. It works just as well under Samba 4 as it has under Samba 3
I have a home network which has a Multimedia PC and a WDTV Live network media player and I need to share a folder in my home folder to stream my home movies to a TV. Standard Samba makes this difficult. The simple way that Ubuntu sets up passwordless Samba shares makes this very easy. This HowTo is for those users who have the need to set up shares in this manner. The instructions should work for Squeeze and newer.
To get started install samba and nautilus-share through Synaptic. You will need to edit /etc/samba/smb.conf as Superuser (su).
1
In the global section of /etc/samba/smb.conf add the line
usershare allow guests = Yes
Find the line ; security = user and add this line directly after
map to guest = bad user
In newer installations this line will already exist.
2
As su run these two commands from a term
chgrp sambashare /var/lib/samba/usershares
chmod 1770 /var/lib/samba/usershares
Ensure the group sambashare is added to your user profile - Just go into "Users and Groups" and check, add if necessary. Look in Manage Groups, scroll down to sambashare and select properties and select you user name to be a group member. It is not enough that your login name is in the list, it must also be selected. If Users and Groups is not in your menus you need to install the package "gnome-system-tools".
3
Restart and you should be able to right click on a folder and select "sharing options" just like in Ubuntu, and others on your network (including media players) should be able to see and browse the shared folders.
The share definitions are stored in /var/lib/samba/usershares automatically by nautilus-share. The share definitions are NOT stored in smb.conf
A user called Altair4 on the Linux Mint Debian Edition forums helped refine this howto with his critique of my slightly out of date approach that I used before.
I have tried to make it as short and simple as I can, anyone with ideas or improvements please speak up .