{"id":670,"date":"2016-05-20T08:48:00","date_gmt":"2016-05-20T06:48:00","guid":{"rendered":""},"modified":"2018-11-22T22:39:23","modified_gmt":"2018-11-22T21:39:23","slug":"linux-mint-how-sharemount-remote-windows-folder-network-domain-controller","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/linux-mint-how-sharemount-remote-windows-folder-network-domain-controller\/","title":{"rendered":"Linux Mint &#8211; how to share\/mount remote windows folder in network with domain controller"},"content":{"rendered":"<p>Here I will briefy describe how to mount a remote windows folder to a local mint linux machine. In general, on the web there are plenty of pages how to do that. However I will focus on situation where windows is using an active direstory or domain based authentication.<\/p>\n<p>First of all install cifs-utils package<\/p>\n<pre>apt-get install cifs-utils<\/pre>\n<p>or just check if it is not already installed<\/p>\n<pre>sudo dpkg -l cifs-utils\r\nDesired=Unknown\/Install\/Remove\/Purge\/Hold\r\n| Status=Not\/Inst\/Conf-files\/Unpacked\/halF-conf\/Half-inst\/trig-aWait\/Trig-pend\r\n|\/ Err?=(none)\/Reinst-required (Status,Err: uppercase=bad)\r\n||\/ Name                              Version               Architecture          Description\r\n+++-=================================-=====================-=====================-========================================================================\r\nii  cifs-utils                        2:6.0-1ubuntu2        amd64                 Common Internet File System utilities\r\n<\/pre>\n<p>then make some local folder where we will mount remote folder<\/p>\n<pre>mkdir ~\/share\/PC-D<\/pre>\n<p>then we will share a remote folder typing following command<\/p>\n<pre>sudo mount -t cifs \/\/REMOTE-WIN-NAME-OR-IP\/REMOTE-SHARED-FOLdER \/LOCAL-LINUX-SHARE -o user=WIN-USERNAME,<span style=\"color: #ff0000;\">domain<\/span>=WIN-DOMAIN<\/pre>\n<p>where in my case it should be<\/p>\n<pre>sudo mount -t cifs \/\/192.168.10.108\/D \/home\/palo\/share\/PC-D\/ -o user=palo,<span style=\"color: #ff0000;\">domain<\/span>=kis<\/pre>\n<p><strong>NOTE: <\/strong>The domain keywors is here important<\/p>\n<p>then you will be prompted for password<\/p>\n<pre>Password for palo@\/\/192.168.10.108\/D:<\/pre>\n<p>so type it and that all is done.<\/p>\n<p>Alternatively you may specify the password within the mount command<\/p>\n<pre>do mount -t cifs \/\/REMOTE-WIN-NAME-OR-IP\/REMOTE-SHARED-FOLdER \/LOCAL-LINUX-SHARE -o user=WIN-USERNAME,<span style=\"color: #ff0000;\">domain<\/span>=WIN-DOAMIN,password=WIN-PASS<\/pre>\n<p>&nbsp;<\/p>\n<p>Verify it typing mount<\/p>\n<pre>palo@PS $ mount\r\n...\r\n\/\/192.168.10.108\/D on \/home\/palo\/share\/PC-D type cifs (rw)\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Unmounting<\/strong><\/p>\n<p>just type<\/p>\n<pre>sudo umount \/LOCAL-MOUNT-FOLDER<\/pre>\n<p>In my case<\/p>\n<pre>sudo umount \/home\/palo\/share\/PC-D<\/pre>\n<p>&nbsp;<\/p>\n<h2>How to make the mounting permanent?<\/h2>\n<p>Open \/etc\/fstab d<\/p>\n<pre>sudo vim \/etc\/fstab<\/pre>\n<p>and add line<\/p>\n<pre>\/\/REMOTE-WIN-NAME-OR-IP\/REMOTE-SHARED-FOLdER \/LOCAL-LINUX-SHARE user=WIN-USERNAME,<span style=\"color: #ff0000;\">domain<\/span>=WIN-DOAMIN,password=WIN-PASS,iocharset=utf8 0 0<\/pre>\n<p>in my case<\/p>\n<pre>\/\/192.168.10.108\/D \/home\/palo\/share\/PC-D\/ cifs  user=palo,domain=kis,password=********,iocharset=utf8 0 0<\/pre>\n<p>then remount it all<\/p>\n<pre>sudo mount -a<\/pre>\n<p>and check with<\/p>\n<pre>mount<\/pre>\n<h3>More secure way of the same<\/h3>\n<p>Previous example has a problem that the \/etc\/fstab may read someone and see your passwords, therefore a secure way of the same is to make a local text file<\/p>\n<pre>vim ~.credentials<\/pre>\n<p>and put there<\/p>\n<pre class=\"programlisting\">username=<em class=\"replaceable\"><code>value<\/code><\/em>value password=<em class=\"replaceable\"><code>value<\/code><\/em>value domain=value<em class=\"replaceable\"><code>value<\/code><\/em><\/pre>\n<p>whare &#8222;value&#8220; are yours usernanme\/password\/domain_name<\/p>\n<p>then modify \/etc\/fstab line from<\/p>\n<pre>\/\/REMOTE-WIN-NAME-OR-IP\/REMOTE-SHARED-FOLdER \/LOCAL-LINUX-SHARE user=WIN-USERNAME,<span style=\"color: #ff0000;\">domain<\/span>=WIN-DOAMIN,password=WIN-PASS,iocharset=utf8 0 0<\/pre>\n<p>to<\/p>\n<pre>\/\/REMOTE-WIN-NAME-OR-IP\/REMOTE-SHARED-FOLdER \/LOCAL-LINUX-SHARE credentials=\/PATH-to-CRED-FILE\/FILENAME,iocharset=utf8 0 0<\/pre>\n<p>then close the file and run<\/p>\n<pre>sudo mount -a<\/pre>\n<p>Done!<\/p>\n<h3>Troubleshooting<\/h3>\n<p>You may receive after typing mount -a command err message<\/p>\n<pre>palo@PS ~ $ sudo mount -a\r\nmount error(13): Permission denied\r\nRefer to the mount.cifs(8) manual page (e.g. man mount.cifs)\r\n<\/pre>\n<p>then check your name, password and domain name if are types correctly.<\/p>\n<h3>Resources:<\/h3>\n<ul>\n<li>Info on FSTAB <a href=\"https:\/\/help.ubuntu.com\/community\/Fstab\">https:\/\/help.ubuntu.com\/community\/Fstab<\/a><\/li>\n<li>mount.cifs <a href=\"https:\/\/www.samba.org\/samba\/docs\/man\/manpages-3\/mount.cifs.8.html\">https:\/\/www.samba.org\/samba\/docs\/man\/manpages-3\/mount.cifs.8.html<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>\n\tHere I will briefy describe how to mount a remote windows folder to a local mint linux machine. In general, on the web there are plenty of pages how to do that. However I will focus on situation where windows is using an active direstory or domain based authentication.<\/p>\n<p>\n\t&nbsp;<\/p>\n<p>\n\tFirst of all install cifs-utils package<\/p>\n<pre>\r\napt-get install cifs-utils<\/pre>\n<p>\n\tor just check if it is not already installed<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[685],"tags":[965,963],"class_list":["post-670","post","type-post","status-publish","format-standard","hentry","category-linux_-_howto-en","tag-linux","tag-mint"],"taxonomy_info":{"category":[{"value":685,"label":"Linux - HOWTO"}],"post_tag":[{"value":965,"label":"linux"},{"value":963,"label":"mint"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":6,"category_info":[{"term_id":685,"name":"Linux - HOWTO","slug":"linux_-_howto-en","term_group":0,"term_taxonomy_id":683,"taxonomy":"category","description":"","parent":0,"count":71,"filter":"raw","cat_ID":685,"category_count":71,"category_description":"","cat_name":"Linux - HOWTO","category_nicename":"linux_-_howto-en","category_parent":0}],"tag_info":[{"term_id":965,"name":"linux","slug":"linux","term_group":0,"term_taxonomy_id":963,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"},{"term_id":963,"name":"mint","slug":"mint","term_group":0,"term_taxonomy_id":961,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=670"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/670\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}