{"id":280,"date":"2010-07-23T03:16:49","date_gmt":"2010-07-23T03:16:49","guid":{"rendered":"http:\/\/poojanwagh.opalstacked.com\/techblog\/?p=280"},"modified":"2011-02-01T03:50:20","modified_gmt":"2011-02-01T03:50:20","slug":"setting-up-public-anonymous-shares-on-samba","status":"publish","type":"post","link":"https:\/\/tech.poojanblog.com\/blog\/unix-linux\/setting-up-public-anonymous-shares-on-samba\/","title":{"rendered":"Setting up public (anonymous) shares on Samba"},"content":{"rendered":"<p>It&#8217;s documented here: <a href=\"http:\/\/micheljansen.org\/blog\/entry\/182\">http:\/\/micheljansen.org\/blog\/entry\/182<\/a>. However, I only found this post after learning each lesson individually.<\/p>\n<p>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.<\/p>\n<p>I tried enabling <code>guest ok<\/code> in <code>\/usr\/local\/etc\/smb.conf<\/code> (and changed the file\/directory masks, so anyone can read by default):<\/p>\n<p>[cc_ini]<br \/>\n[Public]<br \/>\n  comment = Public (user-wide) directories<br \/>\n  browseable = yes<br \/>\n  writeable = no<br \/>\n  path = \/tank\/Users\/Public<br \/>\n  guest ok = yes<br \/>\n  write list = Me, Wife<br \/>\n  create mask = 0775<br \/>\n  directory mask = 0775<br \/>\n[\/cc_ini]<\/p>\n<p>That didn&#8217;t work. Then, I read that you can specify which Unix account guest should map to. However, by default it is <code>nobody<\/code>, which should work.<\/p>\n<p>I finally found the key: A Samba directive called <code>map to guest<\/code> which tells Samba that any user that doesn&#8217;t pass the login should be mapped to the <code>guest<\/code> account. I placed this in my <code>[Public]<\/code> share definition. Samba complained. I then placed it in the <code>[global]<\/code> section, and it worked!\n<\/p>\n<div class='wp_likes' id='wp_likes_post-280'><a class='like' href=\"javascript:wp_likes.like(280);\" title='' ><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/tech.poojanblog.com\/blog\/wp-content\/plugins\/wp-likes\/images\/like.png\" alt='' border='0'\/><\/a><span class='text'>Be the first to like.<\/span><\/p>\n<div class='like' ><a href=\"javascript:wp_likes.like(280);\">Like<\/a><\/div>\n<div class='unlike' ><a href=\"javascript:wp_likes.unlike(280);\">Unlike<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s documented here: http:\/\/micheljansen.org\/blog\/entry\/182. 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 in (and changed the file\/directory masks, so anyone can read by default): [cc_ini] [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[109,108,13],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","category-unix-linux","tag-anonymous","tag-authentication","tag-samba"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/comments?post=280"}],"version-history":[{"count":4,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/280\/revisions"}],"predecessor-version":[{"id":440,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/280\/revisions\/440"}],"wp:attachment":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/media?parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/categories?post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/tags?post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}