{"id":881,"date":"2014-01-11T08:50:11","date_gmt":"2014-01-11T07:50:11","guid":{"rendered":"http:\/\/oprsteny.cz\/?p=881"},"modified":"2014-01-11T08:54:14","modified_gmt":"2014-01-11T07:54:14","slug":"linux-mounting-network-share","status":"publish","type":"post","link":"https:\/\/oprsteny.cz\/?p=881","title":{"rendered":"Linux &#8211; mounting network share"},"content":{"rendered":"<p>How to add samba share to your file system? And how to make this change persistent so the share is mounted automatically at boot time?<!--more--><\/p>\n<p>Manually you can mount it using <em>mount<\/em> command into for instance ~\/Video, like<\/p>\n<pre lang=\"bash\" gutter=false>sudo mount -t cifs -o user=John,password=JohnsP@ssw0rd,rw,hard,nosetuids,noperm,sec=ntlm \/\/192.168.1.2\/Video ~\/Video<\/pre>\n<p>The command above mounts network share drive <em>Video<\/em> on IP 192.168.1.2 to user&#8217;s home directory ~\/<em>Video<\/em> using logon credentials (to access the share drive) name=<em>John<\/em>, password=<em>P@ssw0rd<\/em><\/p>\n<p>To keep this mount persistent, you have to edit <em>\/etc\/fstab<\/em> and add an entry like this<\/p>\n<pre lang=\"bash\" gutter=false>\/\/192.168.1.2\/Video \/home\/LOCAL_USER\/Video cifs auto,user,rw,uid=LOCAL_USER,gid=LOCAL_GROUP,workgroup=WORKGROUP,iocharset=utf8,credentials=\/home\/LOCAL_USER\/.secret\/smb 0 0<\/pre>\n<p>And in <em>\/home\/USER\/.secret\/smb<\/em> you have to put the logon credentials<\/p>\n<pre lang=\"bash\" gutter=false>username=John\r\npassword=P@ssw0rd<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to add samba share to your file system? And how to make this change persistent so the share is mounted automatically at boot time?<\/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":"LInux - mounting network share","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[39,45,40],"tags":[243,241,242,244],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-infrastructure","category-linux","category-networking","tag-fstab","tag-mount","tag-share","tag-smb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3nYbe-ed","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=881"}],"version-history":[{"count":5,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/881\/revisions"}],"predecessor-version":[{"id":885,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/881\/revisions\/885"}],"wp:attachment":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}