{"id":520,"date":"2013-02-06T12:52:27","date_gmt":"2013-02-06T11:52:27","guid":{"rendered":"http:\/\/www.jbahillo.com\/?p=520"},"modified":"2013-07-29T12:38:22","modified_gmt":"2013-07-29T11:38:22","slug":"remote-identification-and-storage","status":"publish","type":"post","link":"https:\/\/www.jbahillo.com\/?p=520","title":{"rendered":"Remote identification and storage"},"content":{"rendered":"<p>Developing an environment of remote home folders under Linux with NFS and LDAP auth is a common task. But there are some cases in which this approach might not be the best one, as you might find some issue to workaround.<\/p>\n<p>I&#8217;m commenting here my experience with thiskind of environment,, using just samba. And&#8230; what about homes&#8230; We&#8217;ll use pam_mount for that<\/p>\n<p>In order for the remote auth a collegue had installed and configured sssd (thx bencer for let me know it, I just knew pam_ldap) I won&#8217;t come into details on configuration for this service, but if you are interested you can check<a href=\"http:\/\/docs.fedoraproject.org\/en-US\/Fedora\/13\/html\/Deployment_Guide\/chap-SSSD_User_Guide-Configuring_Domains.html\">the documentation<\/a> .<\/p>\n<p>Once solved the remote auth, only the remote homes issue remained. Pam_mount, for those that do not know, is a PAM module that allows you to configure automatic mounts through PAM, using the logged user credentials, without writing them in any file (avoiding this way any security issue)<\/p>\n<p>In order to install it just issue:<\/p>\n<pre class=\"brush: bash; auto-links: true; collapse: false; gutter: true; first-line: 1; highlight: []; html-script: false; light: false; pad-line-numbers: true; toolbar: true; wrap-lines: true\">\r\nsudo apt-get install libpam-mount cifs-utils\r\n<\/pre>\n<p>Once installed, we&#8217;ll have to edit file \/etc\/security\/pam_mount.conf.xml like this:<\/p>\n<pre class=\"brush: bash; auto-links: true; collapse: false; gutter: true; first-line: 1; highlight: []; html-script: false; light: false; pad-line-numbers: true; toolbar: true; wrap-lines: true\">\r\n&lt;pam_mount&gt;\r\n&lt;!-- The &lt;mntoptions&gt; elements determine which options *may* be specified for &lt;volume&gt;. --&gt;\r\n&lt;mntoptions allow=&quot;nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other,workgroup,nosetuids,noexec,nosuid&quot; \/&gt;\r\n\r\n&lt;!-- All options listed in require must appear in the option list of per-user mounts. --&gt;\r\n&lt;mntoptions require=&quot;nosuid,nodev&quot; \/&gt;\r\n\r\n&lt;!-- Programs exist that do not terminate when the session is closed. pam_mount can be configured to kill\r\n\r\nthese processes and optionally wait before sending signals. --&gt;\r\n&lt;logout wait=&quot;2&quot; hup=&quot;0&quot; term=&quot;yes&quot; kill=&quot;0&quot; \/&gt;\r\n&lt;!-- Controls automatic creation and removal of mountpoints. --&gt;\r\n&lt;mkmountpoint enable=&quot;1&quot; remove=&quot;true&quot; \/&gt;\r\n\r\n&lt;volume fstype=&quot;cifs&quot; server=&quot;server&quot; path=&quot;share&quot; mountpoint=&quot;~\/share\/&quot; options=&quot;uid=%(USER),dir_mode=0700,file_mode=700,nosuid,nodev&quot; \/&gt;\r\n&lt;\/pam_mount&gt;\r\n<\/pre>\n<p>Just to keep you attention on this<\/p>\n<pre class=\"brush: bash; auto-links: true; collapse: false; gutter: true; first-line: 1; highlight: []; html-script: false; light: false; pad-line-numbers: true; toolbar: true; wrap-lines: true\">\r\n&lt;volume fstype=&quot;cifs&quot; server=&quot;server&quot; path=&quot;homes&quot; mountpoint=&quot;~\/&quot; options=&quot;uid=%(USER),dir_mode=0700,file_mode=700,nosuid,nodev&quot; \/&gt;\r\n<\/pre>\n<p>which is the place where &#8216;magic&#8217; takes place<\/p>\n<p>Logically fstype refers to the filesystem, although it can be used with other fs&#8217;s (not only cifs) like sshfs, cryptoluks, etc<br \/>\nserver refers as it may be guessed to the remote address where the files to mount are<br \/>\npath refers in our case to the share we want to mount<br \/>\nmountpoint refers to the folder where we will mount the resource<\/p>\n<p>Just a reboot and.. voil\u00e1 tutto listo!<\/p>\n<p>An easy and quick solution&#8230; don&#8217;t you think?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Developing an environment of remote home folders under Linux with NFS and LDAP auth is a common task. But there are some cases in which this approach might not be the best one, as you might find some issue to&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.jbahillo.com\/?p=520\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[10,96],"tags":[98,100,99,97],"class_list":["post-520","post","type-post","status-publish","format-standard","hentry","category-gnulinux","category-zentyal","tag-nfs","tag-pam_mount","tag-samba","tag-zentyal-2"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Description of my experience of pam_mount\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Javier Bahillo\"\/>\n\t<meta name=\"keywords\" content=\"nfs,pam_mount,samba,zentyal,gnu\/linux\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.jbahillo.com\/?p=520\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Javier Bahillo | Blog de un Administrador de Sistemas\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Remote identification and storage | Javier Bahillo\" \/>\n\t\t<meta property=\"og:description\" content=\"Description of my experience of pam_mount\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.jbahillo.com\/?p=520\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2013-02-06T11:52:27+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-07-29T11:38:22+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Remote identification and storage | Javier Bahillo\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Description of my experience of pam_mount\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#article\",\"name\":\"Remote identification and storage | Javier Bahillo\",\"headline\":\"Remote identification and storage\",\"author\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?author=21#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/#organization\"},\"datePublished\":\"2013-02-06T12:52:27+01:00\",\"dateModified\":\"2013-07-29T12:38:22+01:00\",\"inLanguage\":\"es-ES\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#webpage\"},\"articleSection\":\"GNU\\\/Linux, Zentyal, nfs, pam_mount, samba, zentyal\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.jbahillo.com#listItem\",\"position\":1,\"name\":\"Inicio\",\"item\":\"https:\\\/\\\/www.jbahillo.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?cat=10#listItem\",\"name\":\"GNU\\\/Linux\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?cat=10#listItem\",\"position\":2,\"name\":\"GNU\\\/Linux\",\"item\":\"https:\\\/\\\/www.jbahillo.com\\\/?cat=10\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#listItem\",\"name\":\"Remote identification and storage\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.jbahillo.com#listItem\",\"name\":\"Inicio\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#listItem\",\"position\":3,\"name\":\"Remote identification and storage\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?cat=10#listItem\",\"name\":\"GNU\\\/Linux\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/#organization\",\"name\":\"Javier Bahillo\",\"description\":\"Blog de un Administrador de Sistemas\",\"url\":\"https:\\\/\\\/www.jbahillo.com\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?author=21#author\",\"url\":\"https:\\\/\\\/www.jbahillo.com\\\/?author=21\",\"name\":\"Javier Bahillo\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23ebe4a43dc73242549ef5e7aeabbb6f292b190480d690968359ac9f5d180474?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Javier Bahillo\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#webpage\",\"url\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520\",\"name\":\"Remote identification and storage | Javier Bahillo\",\"description\":\"Description of my experience of pam_mount\",\"inLanguage\":\"es-ES\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?p=520#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?author=21#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/?author=21#author\"},\"datePublished\":\"2013-02-06T12:52:27+01:00\",\"dateModified\":\"2013-07-29T12:38:22+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/#website\",\"url\":\"https:\\\/\\\/www.jbahillo.com\\\/\",\"name\":\"Javier Bahillo\",\"description\":\"Blog de un Administrador de Sistemas\",\"inLanguage\":\"es-ES\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.jbahillo.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Remote identification and storage | Javier Bahillo","description":"Description of my experience of pam_mount","canonical_url":"https:\/\/www.jbahillo.com\/?p=520","robots":"max-image-preview:large","keywords":"nfs,pam_mount,samba,zentyal,gnu\/linux","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.jbahillo.com\/?p=520#article","name":"Remote identification and storage | Javier Bahillo","headline":"Remote identification and storage","author":{"@id":"https:\/\/www.jbahillo.com\/?author=21#author"},"publisher":{"@id":"https:\/\/www.jbahillo.com\/#organization"},"datePublished":"2013-02-06T12:52:27+01:00","dateModified":"2013-07-29T12:38:22+01:00","inLanguage":"es-ES","mainEntityOfPage":{"@id":"https:\/\/www.jbahillo.com\/?p=520#webpage"},"isPartOf":{"@id":"https:\/\/www.jbahillo.com\/?p=520#webpage"},"articleSection":"GNU\/Linux, Zentyal, nfs, pam_mount, samba, zentyal"},{"@type":"BreadcrumbList","@id":"https:\/\/www.jbahillo.com\/?p=520#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.jbahillo.com#listItem","position":1,"name":"Inicio","item":"https:\/\/www.jbahillo.com","nextItem":{"@type":"ListItem","@id":"https:\/\/www.jbahillo.com\/?cat=10#listItem","name":"GNU\/Linux"}},{"@type":"ListItem","@id":"https:\/\/www.jbahillo.com\/?cat=10#listItem","position":2,"name":"GNU\/Linux","item":"https:\/\/www.jbahillo.com\/?cat=10","nextItem":{"@type":"ListItem","@id":"https:\/\/www.jbahillo.com\/?p=520#listItem","name":"Remote identification and storage"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.jbahillo.com#listItem","name":"Inicio"}},{"@type":"ListItem","@id":"https:\/\/www.jbahillo.com\/?p=520#listItem","position":3,"name":"Remote identification and storage","previousItem":{"@type":"ListItem","@id":"https:\/\/www.jbahillo.com\/?cat=10#listItem","name":"GNU\/Linux"}}]},{"@type":"Organization","@id":"https:\/\/www.jbahillo.com\/#organization","name":"Javier Bahillo","description":"Blog de un Administrador de Sistemas","url":"https:\/\/www.jbahillo.com\/"},{"@type":"Person","@id":"https:\/\/www.jbahillo.com\/?author=21#author","url":"https:\/\/www.jbahillo.com\/?author=21","name":"Javier Bahillo","image":{"@type":"ImageObject","@id":"https:\/\/www.jbahillo.com\/?p=520#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/23ebe4a43dc73242549ef5e7aeabbb6f292b190480d690968359ac9f5d180474?s=96&r=g","width":96,"height":96,"caption":"Javier Bahillo"}},{"@type":"WebPage","@id":"https:\/\/www.jbahillo.com\/?p=520#webpage","url":"https:\/\/www.jbahillo.com\/?p=520","name":"Remote identification and storage | Javier Bahillo","description":"Description of my experience of pam_mount","inLanguage":"es-ES","isPartOf":{"@id":"https:\/\/www.jbahillo.com\/#website"},"breadcrumb":{"@id":"https:\/\/www.jbahillo.com\/?p=520#breadcrumblist"},"author":{"@id":"https:\/\/www.jbahillo.com\/?author=21#author"},"creator":{"@id":"https:\/\/www.jbahillo.com\/?author=21#author"},"datePublished":"2013-02-06T12:52:27+01:00","dateModified":"2013-07-29T12:38:22+01:00"},{"@type":"WebSite","@id":"https:\/\/www.jbahillo.com\/#website","url":"https:\/\/www.jbahillo.com\/","name":"Javier Bahillo","description":"Blog de un Administrador de Sistemas","inLanguage":"es-ES","publisher":{"@id":"https:\/\/www.jbahillo.com\/#organization"}}]},"og:locale":"es_ES","og:site_name":"Javier Bahillo | Blog de un Administrador de Sistemas","og:type":"article","og:title":"Remote identification and storage | Javier Bahillo","og:description":"Description of my experience of pam_mount","og:url":"https:\/\/www.jbahillo.com\/?p=520","article:published_time":"2013-02-06T11:52:27+00:00","article:modified_time":"2013-07-29T11:38:22+00:00","twitter:card":"summary","twitter:title":"Remote identification and storage | Javier Bahillo","twitter:description":"Description of my experience of pam_mount"},"aioseo_meta_data":{"post_id":"520","title":"Remote identification and storage | #site_title","description":"Description of my experience of pam_mount","keywords":[{"label":"NFS","value":"NFS"},{"label":"pam_mount","value":"pam_mount"},{"label":"samba","value":"samba"},{"label":"zentyal","value":"zentyal"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-04-23 20:46:55","updated":"2025-06-03 23:22:26","seo_analyzer_scan_date":null},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74T96-8o","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts\/520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=520"}],"version-history":[{"count":20,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts\/520\/revisions"}],"predecessor-version":[{"id":692,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=\/wp\/v2\/posts\/520\/revisions\/692"}],"wp:attachment":[{"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jbahillo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}