{"id":42,"date":"2012-09-13T18:10:55","date_gmt":"2012-09-13T22:10:55","guid":{"rendered":"http:\/\/www.mbeckler.org\/blog\/?p=42"},"modified":"2012-09-13T18:10:55","modified_gmt":"2012-09-13T22:10:55","slug":"linux-samba-cifs-secure-automount","status":"publish","type":"post","link":"https:\/\/www.mbeckler.org\/blog\/?p=42","title":{"rendered":"Linux Samba (CIFS) secure automount"},"content":{"rendered":"<p>I have my server set up to server files using Samba (the windows filesharing protocol) now called CIFS. I wanted to use some authentication for the read\/write share so here is how to do it.<\/p>\n<p>Make a file called \/etc\/samba.credentials, owned by root:root, with permissions 0600, with these contents:<br \/>\n<code>username=blah<br \/>\npassword=blah<\/code><\/p>\n<p>Then add a line like this to your \/etc\/fstab:<br \/>\n<code>\/\/server\/sharename\t\t\/mount\/point\tcifs\tauto,credentials=\/etc\/samba.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=youruser,gid=yourgroup,nounix\t0 0<\/code><\/p>\n<p>Then it should be automatically mounted when you login!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have my server set up to server files using Samba (the windows filesharing protocol) now called CIFS. I wanted to use some authentication for the read\/write share so here is how to do it. Make a file called \/etc\/samba.credentials, owned by root:root, with permissions 0600, with these contents: username=blah password=blah Then add a line [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[24,10,22,23,9,21,7],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-cifs","tag-linux","tag-samba","tag-smb","tag-software","tag-sysadmin","tag-unix"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2BznB-G","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42"}],"version-history":[{"count":2,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":45,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/42\/revisions\/45"}],"wp:attachment":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}