{"id":888,"date":"2016-10-07T13:24:44","date_gmt":"2016-10-07T11:24:44","guid":{"rendered":"http:\/\/ndk.sytes.net\/wordpress\/?p=888"},"modified":"2016-10-07T13:24:44","modified_gmt":"2016-10-07T11:24:44","slug":"mounting-samba-share-permanently-ubuntu-16-04-lts","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=888","title":{"rendered":"Mounting samba share permanently (Ubuntu 16.04 LTS)"},"content":{"rendered":"<p>\n\tHere is how to mount a windows\/samba share permanently with your \/etc\/fstab:\n<\/p>\n<p>\n\tFirst install the cifs-utils package:\n<\/p>\n<pre>\n# apt-get install cifs-utils<\/pre>\n<p>\n\tnow create a credential file containing your user and password\n<\/p>\n<pre>\n# vim \/home\/myuser\/.smbcredentials<\/pre>\n<p>\n\tadd following lines:\n<\/p>\n<pre>\nusername=myuser\npassword=mypassword\ndomain=mydomain (optional)<\/pre>\n<p>\n\tthen secure its permissions:\n<\/p>\n<pre>\n# chmod 600 \/home\/myuser\/.smbcredentials<\/pre>\n<p>\n\tafter that open your \/etc\/fstab and add following line to it:\n<\/p>\n<pre>\n\/\/servername\/share \/mymountpoint cifs vers=3.0,sec=ntlmssp,credentials=\/home\/myuser\/.smbcredentials,iocharset=utf8 0 0<\/pre>\n<p>\n\tas a final step run\n<\/p>\n<pre>\n# sudo mount -a<\/pre>\n<p>\n\tSome explanations on the fstab line:\n<\/p>\n<p>\n\tvers:&nbsp;this specifies the SMB protocol version, in my case version 3.0<br \/>\n\tsec: sets the security for the password hashes, here NTLMv2 password hash inside raw NTLM<br \/>\n\tcredentials: sets the file with your credentials<br \/>\n\tiocharst: sets the encoding to UTF-8\n<\/p>\n<p>\n\t(refer to man mount.cifs for parameter details)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is how to mount a windows\/samba share permanently with your \/etc\/fstab: First install the cifs-utils package: # apt-get install cifs-utils now create a credential file containing your user and password # vim \/home\/myuser\/.smbcredentials add following lines: username=myuser password=mypassword domain=mydomain (optional) then secure its permissions: # chmod 600 \/home\/myuser\/.smbcredentials after that open your \/etc\/fstab and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-888","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=888"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/888\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}