{"id":933,"date":"2011-12-31T21:30:13","date_gmt":"2012-01-01T04:30:13","guid":{"rendered":"http:\/\/daemon.makovey.net\/?p=933"},"modified":"2011-12-31T21:30:13","modified_gmt":"2012-01-01T04:30:13","slug":"easy-way-to-mount-cifs-in-fedora-linux-via-autofs","status":"publish","type":"post","link":"https:\/\/daemon.makovey.net\/?p=933","title":{"rendered":"Easy way to mount CIFS in (Fedora) linux via autofs"},"content":{"rendered":"<p>after struggling with <a title=\"Accessing Windows Or Samba Shares Using AutoFS\" href=\"http:\/\/www.howtoforge.com\/accessing_windows_or_samba_shares_using_autofs\">HOWTO Forge&#8217;s recipe<\/a> and <a title=\"Mounting SMB\/CIFS volumes with autofs on the fly\" href=\"http:\/\/forums.fedoraforum.org\/showthread.php?t=240811\">Fedora&#8217;s modification<\/a> of the same recipe, CentOS provides some helpful info on how to set things up <a title=\"How to mount remote Windows shares\" href=\"http:\/\/wiki.centos.org\/TipsAndTricks\/WindowsShares#head-96fc35dfb9f5c3083e0569ec02e1aeaa80bb20b8\">the easy way<\/a>:<\/p>\n<pre># yum install autofs cifs-utils\n# mkdir \/mnt\/smb<\/pre>\n<p>Add this line to <tt>\/etc\/auto.master<\/tt>:<\/p>\n<p>&nbsp;<\/p>\n<pre>\/mnt\/smb \/etc\/auto.smb.top<\/pre>\n<p>Create <tt>\/etc\/auto.smb.top<\/tt> as:<\/p>\n<p>&nbsp;<\/p>\n<pre>* -fstype=autofs,-Dhost=&amp; file:\/etc\/auto.smb.sub<\/pre>\n<p>Create <tt>\/etc\/auto.smb.sub<\/tt> as (adjust as needed):<\/p>\n<p>&nbsp;<\/p>\n<pre>* -fstype=cifs,credentials=\/root\/secret.txt,uid=500,gid=100 :\/\/${host}\/&amp;<\/pre>\n<p>Now you can access by simply typing:<\/p>\n<p>&nbsp;<\/p>\n<pre># cd \/mnt\/smb\/winbox\/getme<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>after struggling with HOWTO Forge&#8217;s recipe and Fedora&#8217;s modification of the same recipe, CentOS provides some helpful info on how to set things up the easy way: # yum install autofs cifs-utils # mkdir \/mnt\/smb Add this line to \/etc\/auto.master: &nbsp; \/mnt\/smb \/etc\/auto.smb.top Create \/etc\/auto.smb.top as: &nbsp; * -fstype=autofs,-Dhost=&amp; file:\/etc\/auto.smb.sub Create \/etc\/auto.smb.sub as (adjust as [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-933","post","type-post","status-publish","format-standard","hentry","category-machine","category-penguinarium"],"_links":{"self":[{"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=\/wp\/v2\/posts\/933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=933"}],"version-history":[{"count":0,"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=\/wp\/v2\/posts\/933\/revisions"}],"wp:attachment":[{"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daemon.makovey.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}