How can I create a shared directory with samba? Is possible to make it visible only to a restrict number of people that use the network or I can only restrict the permission of access ?
-You can just add the definitions on the "/etc/samba/smb.conf" on the final of the file the definitions that permit share the folder on the samba, like this simple sample...
[shared] path = /home/user/shared <= Here we just put the path of the folder that we goes share. available = yes browsable = yes public = yes writable = no
...where we just stay defined the shared folder, with this definitions the folder are disposable, can be browsable, are public everyone can access it! but is not writable is just for read no have write access!!! this shared folder on the network.
You can add an folder with more controlled access like this lil' sample that show on server a folder with named "Users" but when the user access this folder they access your "HOME Folder on the system".
[Users] comment = Home User's folders (%L server) path = /home/%U valid users = %U available = yes browsable = yes writable = yes guest ok = no public = no printable = no locking = yes strict locking = yes