My general stuff. This will generally include computer related information, but may also contain general rantings on my part.

Wednesday, December 29, 2010

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.

Install samba

yum install samba-client samba-common samba

Configure the /etc/samba/samba.conf file

Find the line workgroup and set the correct workgroup name

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"

# foo

[foo]

path = /foo

writeable = yes

browseable = yes

valid users = foo

Save the file and restart the services -- service smb restart, service nmb restart

Make sure the user "foo" exists, and set the samba password - smbpasswd -a foo