{"id":685,"date":"2016-11-25T14:08:27","date_gmt":"2016-11-25T13:08:27","guid":{"rendered":"http:\/\/drfugazi.eu.org\/?p=685"},"modified":"2017-01-25T16:37:20","modified_gmt":"2017-01-25T15:37:20","slug":"autofs-in-ldap-configuration-linux-solaris","status":"publish","type":"post","link":"https:\/\/drfugazi.eu.org\/en\/autofs-in-ldap-configuration-linux-solaris\/","title":{"rendered":"Autofs in LDAP configuration &#8211; for Linux and Solaris"},"content":{"rendered":"<p>If you have LDAP server as user repository it is also good to have NFS server to store their home directories. To avoid autofs map configuration on every host, you can use LDAP service to store maps. I assume that NFS server (NFSHOME) is already installed, LDAP server and client are configured (see previous posts).<br \/>\nWhat do you need to do:<\/p>\n<p>1. Enable <code>nis.schema<\/code> in LDAP server &#8211; you need to have nisObject and nisMap structural object classes and nisMapEntry, nisMapName attributes &#8211; schema is included in standard OpenLDAP distribution (\/etc\/openldap\/schema).<\/p>\n<p>2. Add nis maps to LDAP server &#8211; for Solaris:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: nisMapName=auto_master,ou=service,dc=mycompany,dc=com\r\nobjectClass: top\r\nobjectClass: nisMap\r\nnisMapName: auto_master<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: nisMapName=auto_home,ou=service,dc=mycompany,dc=com\r\nobjectClass: top\r\nobjectClass: nisMap\r\nnisMapName: auto_home<\/pre>\n<p>for Linux &#8211; mind the dot (.) instead of underscore (_):<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: nisMapName=auto.master,ou=service,dc=mycompany,dc=com\r\nobjectClass: top\r\nobjectClass: nisMap\r\nnisMapName: auto.master<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: nisMapName=auto.home,ou=service,dc=mycompany,dc=com\r\nobjectClass: top\r\nobjectClass: nisMap\r\nnisMapName: auto.home<\/pre>\n<p>3. Add nis objects to LDAP server &#8211; in this case <code>\/home\/user<\/code> will be mapped to <code>\/app\/nethomes\/user<\/code> on NFSHOME server &#8211; there is a wildcard (<code>cn=*<\/code>), but you can configure map for each user separatelly:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: cn=\/home,nisMapName=auto_master,ou=service,dc=mycompany,dc=com\r\nobjectClass: top\r\nobjectClass: nisObject\r\ncn: \/home\r\nnisMapEntry: auto_home -nosuid,nobrowse\r\nnisMapName: auto_master<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: cn=*,nisMapName=auto_home,ou=service,dc=mycompany,dc=com\r\nobjectClass: top\r\nobjectClass: nisObject\r\ncn: *\r\nnisMapEntry: -rw,sync,quota,vers=4 NFSHOME:\/app\/nethomes\/&amp;\r\nnisMapName: auto_home<\/pre>\n<p>for Linux &#8211; change underscore to dot (auto_home -&gt; auto.home etc.)<\/p>\n<p>4. Solaris only &#8211; add proper entries to attributeMap, objectclassMap and serviceSearchDescriptor in your DUA profile:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: cn=dev,ou=profile,dc=mycompany,dc=com\r\nobjectClass: DUAConfigProfile\r\nobjectClass: top\r\ncn: dev<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nattributeMap: automount:automountKey=cn\r\nattributeMap: automount:automountInformation=nisMapEntry\r\nattributeMap: automount:automountMapName=nisMapName\r\nobjectclassMap: automount:automount=nisObject\r\nobjectclassMap: automount:automountMap=nisMap\r\nserviceSearchDescriptor: auto_master:ou=service,dc=capgemini,dc=com?sub?nisMapName=auto_master\r\nserviceSearchDescriptor: auto_home:ou=service,dc=capgemini,dc=com?sub?nisMapName=auto_home\r\n<\/pre>\n<p>5. Add nisDomainObject and nisDomain attribute to your domain object &#8211; this is optional, but I remember that I had some warnings when it was not defined. Below you have schema and entry ldifs:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: cn={6}nisdomain,cn=schema,cn=config\r\nobjectClass: olcSchemaConfig\r\ncn: {6}nisdomain\r\nolcAttributeTypes: {0}( 1.3.6.1.1.1.1.1.30 NAME 'nisDomain' DESC 'NIS domain\r\n ' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN\r\n 'user defined' )\r\nolcObjectClasses: {0}( 1.3.6.1.1.1.2.15 NAME 'nisDomainObject' DESC 'Associa\r\n tes a NIS domain with a naming context' SUP top AUXILIARY MUST nisDomain X-\r\n ORIGIN 'user defined' )<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndn: dc=mycompany,dc=com\r\nobjectClass: top\r\nobjectClass: nisDomainObject\r\nobjectClass: dcObject\r\nobjectClass: domain\r\ndc: mycompany\r\nnisDomain: mycompany.com<\/pre>\n<p>Client configuration in separate posts.<\/p>\n<p>Useful links:<br \/>\n<a href=\"https:\/\/community.oracle.com\/thread\/1914905?start=0&#038;tstart=0\">https:\/\/community.oracle.com\/thread\/1914905?start=0&amp;tstart=0<\/a><br \/>\n<a href=\"https:\/\/community.oracle.com\/thread\/1910088?start=0&#038;tstart=0\">https:\/\/community.oracle.com\/thread\/1910088?start=0&amp;tstart=0<\/a><br \/>\n<a href=\"http:\/\/shanit.blogspot.de\/2009\/03\/solaris-10-autofs.html\">http:\/\/shanit.blogspot.de\/2009\/03\/solaris-10-autofs.html<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>If you have LDAP server as user repository it is also good to have NFS server to store their home directories. To avoid autofs map configuration on every host, you can use LDAP service&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":627,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[115,98,108],"tags":[6,99,44,9],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/06\/LDAP-DIT.jpg?fit=1267%2C1073&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7M9Tz-b3","jetpack-related-posts":[{"id":210,"url":"https:\/\/drfugazi.eu.org\/en\/","url_meta":{"origin":685,"position":0},"title":"openldap-2.4.23","author":"drfugazi","date":"Monday August 16th, 2010","format":false,"excerpt":"OpenLDAP jest Open Sourceow\u0105 implementacj\u0105 us\u0142ugi katalogowej opartej na protokole LDAP (Lightweight Directory Access Protocol) Suita zawiera: slapd - samodzielnie dzia\u0142aj\u0105cy demon LDAP (serwer); biblioteki implementuj\u0105ce protok\u00f3\u0142 LDAP; narz\u0119dzia, programy u\u017cytkowe i przyk\u0142adowe klienty. \u0179r\u00f3d\u0142o: http:\/\/www.openldap.org\/","rel":"","context":"In \"Compilation\"","block_context":{"text":"Compilation","link":"https:\/\/drfugazi.eu.org\/en\/tag\/kompilacja\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":719,"url":"https:\/\/drfugazi.eu.org\/en\/linux-ldap-autofs-client-configuration\/","url_meta":{"origin":685,"position":1},"title":"Linux LDAP autofs client configuration","author":"drfugazi","date":"Wednesday May 10th, 2017","format":false,"excerpt":"There is a plenty of Linux distributions, so there is not my point to describe how to configure autofs in every one of them. This description is based on RedHat\/CentOS, but it can be applied to other distributions with very small changes. If you have local users and their directories\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/10\/linux-logo.jpg?fit=300%2C300&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":692,"url":"https:\/\/drfugazi.eu.org\/en\/solaris-ldap-autofs-client-configuration\/","url_meta":{"origin":685,"position":2},"title":"Solaris LDAP autofs client configuration","author":"drfugazi","date":"Thursday December 15th, 2016","format":false,"excerpt":"Last time I wrote about autofs configuration on LDAP server, now it is time to configure autofs client in Solaris. I assume that in DUAConfigProfile, objectClasses and attributes are already defined. You can check this with simply commands: [bash] % ldaplist -l auto_master dn: automountMapName=auto_master,ou=service,dc=mycompany,dc=com automountMapName: auto_master objectClass: automountMap objectClass:\u2026","rel":"","context":"In &quot;LDAP&quot;","block_context":{"text":"LDAP","link":"https:\/\/drfugazi.eu.org\/en\/category\/ldap\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/02\/Solaris_OS_logo.png?fit=800%2C393&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/02\/Solaris_OS_logo.png?fit=800%2C393&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/02\/Solaris_OS_logo.png?fit=800%2C393&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/drfugazi.eu.org\/wp-content\/uploads\/2016\/02\/Solaris_OS_logo.png?fit=800%2C393&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":271,"url":"https:\/\/drfugazi.eu.org\/en\/berkeley-db-upgrade\/","url_meta":{"origin":685,"position":3},"title":"BerkeleyDB upgrade","author":"drfugazi","date":"Wednesday May 25th, 2011","format":false,"excerpt":"During switching LDAP directory to new environment with newer version of OpenLDAP (2.4.25) and new BerkeleyDB (5.1.25), I received following error message: Program version 5.1 doesn't match environment version 4.7 database ... cannot be opened, err -30969. Restore from backup! bdb(...): txn_checkpoint interface requires an environment configured for the transaction\u2026","rel":"","context":"In &quot;Solaris&quot;","block_context":{"text":"Solaris","link":"https:\/\/drfugazi.eu.org\/en\/category\/solaris\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":211,"url":"https:\/\/drfugazi.eu.org\/en\/openldap-2423\/","url_meta":{"origin":685,"position":4},"title":"openldap-2.4.23","author":"drfugazi","date":"Monday August 16th, 2010","format":false,"excerpt":"OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol. The suite includes: slapd - stand-alone LDAP daemon (server) ibraries implementing the LDAP protocol, and utilities, tools, and sample clients. Source: http:\/\/www.openldap.org\/","rel":"","context":"In \"Mail system\"","block_context":{"text":"Mail system","link":"https:\/\/drfugazi.eu.org\/en\/tag\/mail_system\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":266,"url":"https:\/\/drfugazi.eu.org\/en\/","url_meta":{"origin":685,"position":5},"title":"OpenLDAP-2.4.25","author":"drfugazi","date":"Friday May 20th, 2011","format":false,"excerpt":"OpenLDAP jest implementacj\u0105 open source protoko\u0142u Lightweight Directory Access Protocol. soft@wega:~\/openldap% .\/drf_openldap-2.4.25_conf cc: Sun C 5.10 SunOS_sparc 2009\/06\/03 usage: cc [ options] files. Use 'cc -flags' for details MANPATH=\/usr\/local\/share\/man:\/usr\/local\/man:\/usr\/share\/man PATH=\/usr\/local\/bin:\/usr\/bin:\/opt\/SUNWspro\/bin:\/usr\/ccs\/bin CFLAGS=-fast -xautopar CPPFLAGS=-I\/usr\/local\/ssl\/include -I\/usr\/local\/BerkeleyDB.5.1\/include -I\/usr\/local\/include CXXFLAGS=-fast -xautopar LDFLAGS=-L\/usr\/local\/ssl\/lib -R\/usr\/local\/ssl\/lib -L\/usr\/local\/BerkeleyDB.5.1\/lib -R\/usr\/local\/BerkeleyDB.5.1\/lib -L\/usr\/local\/lib -R\/usr\/local\/lib ============================================= dmake clean [y|n] ? n","rel":"","context":"In \"Compilation\"","block_context":{"text":"Compilation","link":"https:\/\/drfugazi.eu.org\/en\/tag\/kompilacja\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/685"}],"collection":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/comments?post=685"}],"version-history":[{"count":6,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":691,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/posts\/685\/revisions\/691"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/media\/627"}],"wp:attachment":[{"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/media?parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/categories?post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/drfugazi.eu.org\/en\/wp-json\/wp\/v2\/tags?post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}