SMB -- Provide network shares to specific clients

Setting up samba is always fun. Laden with landmines between the Windows and Linux world, everytime you think you have a working solution, it flakes out on you. Here are the steps needed to add an SMB share to specific clients.

  1. Install samba 
    1. yum install samba-client samba-common samba
  2. Configure the /etc/samba/samba.conf file
    1. Find the line workgroup and set the correct workgroup name
    2. At the end of the file, create a new directory block using the same syntax as the others. This example will create a share named “foo” that is only accessible by user “foo”
      1. # foo
      2. [foo]
      3. path = /foo
      4. writeable = yes
      5. browseable = yes
      6. valid users = foo
  3. Save the file and restart the services — service smb restart, service nmb restart
  4. Make sure the user “foo” exists, and set the samba password – smbpasswd -a foo

Comments