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 ?


2 Answers 2


-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...

      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.

  • Thank you! This answer helped me a lot at job. I configured a Linux server to share docs with others using Windows.
    – Unix
    Jun 13, 2022 at 17:06

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".

    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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .