{"id":48,"date":"2021-10-18T15:43:13","date_gmt":"2021-10-18T23:43:13","guid":{"rendered":"https:\/\/www.liljegrens.org\/?p=48"},"modified":"2021-10-19T08:16:57","modified_gmt":"2021-10-19T16:16:57","slug":"mount-drive","status":"publish","type":"post","link":"https:\/\/www.liljegrens.org\/?p=48","title":{"rendered":"Mount Drive"},"content":{"rendered":"\n<p style=\"font-size:25px\"> Ubuntu 20.04 mounting a drive using a credential file <\/p>\n\n\n\n<p>&#8211;create mount point<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/media\nsudo mkdir 'mount point name'<\/code><\/pre>\n\n\n\n<p> &#8211;edit fstab <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano ~\/etc\/fstab<\/code><\/pre>\n\n\n\n<p>&#8211;add line &#8211; noauto is used to mount at login, delete to mount at boot<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/server\/share \/media\/'mount point name' cifs credentials=\/home\/username\/.smbcredentials,user,noauto,iocharset=utf8, 0 0<\/code><\/pre>\n\n\n\n<p>&#8211;install cifs helper program<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install cifs-utils<\/code><\/pre>\n\n\n\n<p>&#8211;create credential file <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano ~\/.smbcredentials<\/code><\/pre>\n\n\n\n<p>&#8211;change user and password to your credentials of choice<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>user=yourusername\npassword=yourpassword<\/code><\/pre>\n\n\n\n<p>&#8211;mount drive<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mount -a<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 20.04 mounting a drive using a credential file &#8211;create mount point &#8211;edit fstab &#8211;add line &#8211; noauto is used<\/p>\n<p><a href=\"https:\/\/www.liljegrens.org\/?p=48\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">Mount Drive<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/48"}],"collection":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=48"}],"version-history":[{"count":10,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/48\/revisions"}],"predecessor-version":[{"id":63,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/48\/revisions\/63"}],"wp:attachment":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}