Skip to content

Setting up public (anonymous) shares on Samba

It’s documented here: However, I only found this post after learning each lesson individually.

I wanted to set up a \\server\Public share that anyone on the network could connect to. Certain users can write, but everyone can read.

I tried enabling guest ok in /usr/local/etc/smb.conf (and changed the file/directory masks, so anyone can read by default):

comment = Public (user-wide) directories
browseable = yes
writeable = no
path = /tank/Users/Public
guest ok = yes
write list = Me, Wife
create mask = 0775
directory mask = 0775

That didn’t work. Then, I read that you can specify which Unix account guest should map to. However, by default it is nobody, which should work.

I finally found the key: A Samba directive called map to guest which tells Samba that any user that doesn’t pass the login should be mapped to the guest account. I placed this in my [Public] share definition. Samba complained. I then placed it in the [global] section, and it worked!

Be the first to like.

Post a Comment

Your email is never published nor shared. Required fields are marked *