I want to use Samba as a centralised way to share files over a home network.

I'm fairly familiar with Samba and have managed to set up /home and general shares that were accessible once I had logged in. However, getting this to work from booting has proved to be more difficult and I just wanted to check that I was taking the right approach? Ideally I would like to achieve the following:

  • That the /home directory on the Samba server becomes the /home directory for all clients on booting.
  • That once the user logs onto the client machine their home share is accessible without having to re-enter a password (or no more than once).
  • That local home (I.e. the client machine) is not accessible to the user when the remote home share is accessible.
  • That there is some sort of synchronisation or fail safe set up where local home is kept updated and accessible in the event of the server being unavailable.

So what I would like to know is the following:

  • Is the [homes] setup in smb.conf suitable for this?
    For example could I use //ipaddress/homes/ /home/ cifs _netdev,user=samba,password=password 0 0 in fstab on the client machine to achieve the goals above? Or should I create a separate customised share for the server /home directory and link to that in fstab? E.g.

    path = /home/
    comment = /home
    browesable = no
    writeable = yes
    valid users = @users
    And then link to that in fstab.
    Note: I'm aware that this is not a secure set up and is simply to test that it actually works.
  • Whether there is anything I'm missing, whether there is a better way to do it? (Preferably Samba based, as I want to be able to share with Windows machines and also because I want to learn Samba).

Some system details:

Ubuntu 10.04 – Samba server.
Linux Mint 11 – Samba client.
Network – Standard wired ethernet.

If there is anything that I haven't made clear then feel free to ask. Otherwise thanks in advance for any help.