I have some difficulties with sharing folders in a local area network by using samba. I have managed everything up to the point that every folder that I share is being detected, can be read and can be written to. My problem however is, that next to the folders that I have explicitly shared, also my /home/carlos folder can be accessed. So basically all my data is exposed unintentionally. Currently I have my firewall blocking samba, so nothing is exposed at the moment, however I want to use samba though. I would like some assistance in correctly configuring samba.

What have I done so far

Copied default configuration file:

cp /etc/samba/smb.conf.default /etc/samba/smb.conf

Changed workgroup from MYGROUP into Baptista and add these lines to the [global] section in /etc/samba/smb.conf:

usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False

Changed [homes] section configuration to read

    comment = Home Directories
    browseable = No
    writable = No

Run these commands in a terminal:

# mkdir /var/lib/samba/usershares
# chgrp users /var/lib/samba/usershares/
# chmod 1775 /var/lib/samba/usershares/
# chmod +t /var/lib/samba/usershares/

(these commands and several settings were taken from section 1.7 of https://wiki.archlinux.org/index.php/Samba/Troubleshooting)

Share a folder by launching Dolphin, right-click a folder, select properties, select the share tab, configure settings and press OK.


Let assume I shared the folder /home/carlos/Music, then not only is /home/carlos/Music available through samba, my entire /home/carlos is available. How can I fix this, such that only the folders than I explicitly share, are shared?

System information

  • Chakra Linux, 64-bit
  • Linux kernel 3.12.6-1
  • KDE 4.12.0
  • Qt 4.8.5
  • Samba 4.1.1-1
  • Two laptops, same OS, same username
  • 1
    Are you sure that [home] section isn't actually [homes] (plural)?
    – phemmer
    Commented Jan 21, 2014 at 4:22
  • Yes you are right it was a typo Commented Jan 21, 2014 at 5:46

2 Answers 2


Your home directory is not being exposed. The [homes] section is a special section within the samba config. Basically it makes the home directory of the user you are logging in as accessible. So if you connect to samba as cfbapista, then it will make the home directory of cfbapista accessible. If the user johndoe connects, they will only see the home directory for johndoe, and not cfbapista.

You can find more details about the section in the smb.conf man page.


I have solved my problem by commenting out [homes] and all its fields.

You must log in to answer this question.

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