1

After a fresh install of Samba I added these lines to the /etc/samba/smb.conf file:

[Media]
comment = Media Folder
path = /media
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

And then I decided to add my "pi" account (the default account) to Samba using:

sudo smbpasswd -a pi

Everything worked, however, when connecting on windows, there were two extra folders appearing that I did not want shared. One was leading to the standard pi directory, and the other was for some printing service. I managed to disable the printing one by adding this to the .conf:

load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

However, I cannot figure out how to disable the other "pi" directory (/home/pi) from being shared.

1

By default, samba will create a share for the user you log in as corresponding to that user's home directory. Since you're logging in as user pi, that's the "extra" share you're seeing. If you want to disable this behavior, look for a [homes] section in your /etc/samba/smb.conf and comment that entire section out by prefacing each line with '#', or just delete it. You could do the same with the [printers] section.

  • For some reason, doing so, prevents the device from being found by other devices. – user2005848 Jun 30 '15 at 23:32
  • Doing what specifically? Be sure to only comment out the appropriate section -- the [homes] line and the indented block of lines below it. – bobstro Jul 1 '15 at 0:34
  • I changed this: [homes] comment = Home Directories browseable = no to this: #[homes] #comment = Home Directories #browseable = no (Sorry for the lack of formatting, doesn't seem like I can do anything in the comment section) – user2005848 Jul 1 '15 at 2:22
  • What is the output of `testparm'? You should see a dump that shows your service definitions. If you've made the edits properly, you should see your [Media] share, but not the [homes] section. This is really not a RPi-specific question. You might get more answers on the Unix & Linux stackexchange site. – bobstro Jul 1 '15 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.