{"id":5271,"date":"2014-08-18T07:48:28","date_gmt":"2014-08-17T21:48:28","guid":{"rendered":"http:\/\/nsrd.info\/blog\/?p=5271"},"modified":"2018-12-11T13:41:36","modified_gmt":"2018-12-11T03:41:36","slug":"external-networker-authentication-without-ad","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2014\/08\/18\/external-networker-authentication-without-ad\/","title":{"rendered":"External NetWorker Authentication without AD"},"content":{"rendered":"<p>One of the least used features in NetWorker is the option for external authentication of user&nbsp;accounts for use with NMC. This is normally discussed in the context of integrating NMC&nbsp;authentication into an Active Directory environment, but in theory, other LDAP v3 compliant directory services are compatible.<\/p>\n<p>So over the weekend, I gave myself two goals: learn enough on the Ukulele to be able to&nbsp;play a song my boyfriend&nbsp;would recognise and&nbsp;integrate a lab NetWorker&nbsp;environment with the directory services&nbsp;provided by my OS X&nbsp;Server (10.9).<\/p>\n<p>Surprisingly, I managed both \u2013 though perhaps unsurprisingly, the NMC\/LDAP authentication was the trickier goal to get sorted out.<\/p>\n<p>The first step I followed was to create a new&nbsp;group in LDAP called &#8216;nsradmin&#8217;, and placed into that group the&nbsp;user accounts that I wanted to be able to administer the NetWorker server. With that done, I switched back to NMC:<\/p>\n<p><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5272\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_01.png\" alt=\"External authentication 1\" width=\"452\" height=\"248\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_01.png 452w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_01-300x164.png 300w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><\/a><\/p>\n<p>From within NMC&#8217;s&nbsp;<em>main<\/em> window, go to <i>Setup &gt; Configure Login Authentication&#8230;<\/i>&nbsp;and choose to configure an external repository, as shown below:<\/p>\n<p><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5273\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_02.png\" alt=\"External Authentication 2\" width=\"590\" height=\"739\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_02.png 590w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_02-239x300.png 239w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n<p>My external repository is pretty basic; as a home&nbsp;server, it&#8217;s a fairly flat structure, so the configured repository resembled the following:<\/p>\n<p><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5274\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_03.png\" alt=\"External Authentication 3\" width=\"589\" height=\"740\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_03.png 589w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_03-238x300.png 238w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/a><\/p>\n<p>In the distinguished name, I referenced the full DN to the directory administrator. This is normally undesirable; a preferred option would be to configure another directory user that has&nbsp;appropriate read permissions but&nbsp;limited to no modification permissions. I didn&#8217;t feel like diving into that level of control within LDAP and it was only a lab server so I plunged ahead with the actual directory administrator.<\/p>\n<p>The user and group search path are both straight forward:<\/p>\n<ul>\n<li>User&nbsp;Search Path: cn=users,dc=miranda,dc=turbamentis,dc=int<\/li>\n<li>Group Search Path: cn=groups,dc=miranda,dc=turbamentis,dc=int<\/li>\n<\/ul>\n<p>For Apple&#8217;s directory services,&nbsp;you need to modify&nbsp;most of the options in the&nbsp;<em>Advanced<\/em> field, viz:<\/p>\n<ul>\n<li>User ID Attribute becomes &#8216;uid&#8217; for non-AD servers<\/li>\n<li>User Object Class is &#8216;apple-user&#8217;<\/li>\n<li>Group Object&nbsp;Class is &#8216;apple-group&#8217;<\/li>\n<li>Group Member Attribute is &#8216;memberUid&#8217;<\/li>\n<\/ul>\n<p>For what it&#8217;s worth, I confirmed those settings by using the&nbsp;<em>ldapsearch<\/em> tool on the directory server:<\/p>\n<pre>#&nbsp;<strong>ldapsearch -LLL -h miranda.turbamentis.int -b \"cn=users,dc=miranda,dc=turbamentis,dc=int\" -D \"uid=diradmin,cn=users,dc=miranda,dc=turbamentis,dc=int\" -W<\/strong><\/pre>\n<pre>...snip...<\/pre>\n<pre>dn: uid=services,cn=users,dc=miranda,dc=turbamentis,dc=int\n<em><strong>uid<\/strong><\/em>: services\nuidNumber: ...\nhomeDirectory: \/Users\/services\ncn: Services User\nsn: User\nloginShell: \/bin\/bash\ngivenName: Services\nobjectClass: person\nobjectClass: inetOrgPerson\nobjectClass: organizationalPerson\nobjectClass: posixAccount\nobjectClass: shadowAccount\nobjectClass: top\nobjectClass: extensibleObject\nobjectClass: <em><strong>apple-user<\/strong><\/em><\/pre>\n<pre># <strong>ldapsearch -LLL -h miranda.turbamentis.int -b \"cn=Groups,dc=miranda,dc=turbamentis,dc=int\" -D \"uid=diradmin,cn=users,dc=miranda,dc=turbamentis,dc=int\" -W<\/strong><\/pre>\n<pre>...snip...<\/pre>\n<pre>dn: cn=nsradmin,cn=groups,dc=miranda,dc=turbamentis,dc=int\nobjectClass: top\nobjectClass: posixGroup\nobjectClass: extensibleObject\nobjectClass: <em><strong>apple-group<\/strong><\/em>\napple-group-realname: nsradmin\ncn: nsradmin\napple-ownerguid:&nbsp;...\napple-generateduid:&nbsp;...\ngidNumber: ...\napple-group-memberguid:&nbsp;...\napple-group-memberguid:&nbsp;...\n<em><strong>memberUid<\/strong><\/em>: pmdg\n<em><strong>memberUid<\/strong><\/em>: services<\/pre>\n<p>If you&#8217;re encountering issues with&nbsp;the configuration (and more importantly,&nbsp;subsequent testing), I&#8217;d recommend setting the LDAP Debug Level to 1 so that you can see what sort of LDAP searches NMC is performing \u2013 these can&nbsp;be seen from the gstd.raw file in the&nbsp;NetWorker&nbsp;Management Console logs directory. If you&#8217;re not sure whether you&#8217;ve got all the details correct, by the way, just hit the <em>Next&gt;<\/em> button &#8230; you can&#8217;t progress to the next screen unless NMC can&nbsp;successfully query the list of groups and names based on the details you&#8217;ve entered.<\/p>\n<p>Clicking next, you&#8217;ll be prompted to confirm which users and roles will have &#8216;Console&nbsp;Security Administrator Role&#8217; \u2013 this is a&nbsp;critical field; this defines the users who can re-invoke this form&nbsp;<em>after<\/em> the switchover to external authentication has&nbsp;happened:<\/p>\n<p><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5275\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_04.png\" alt=\"External Authentication 4\" width=\"590\" height=\"740\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_04.png 590w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_04-239x300.png 239w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n<p>Make sure there&#8217;s at least one&nbsp;actual user account defined in there. This is where I came-a-cropper the first few times \u2013 I assumed I could&nbsp;<em>just<\/em> use the group in there and it would be&nbsp;sufficient. (I&#8217;d need to go back and check against an Active Directory associated NMC server to confirm whether it&#8217;s any different there as I can&#8217;t recall off-hand.)<\/p>\n<p>Click&nbsp;<em>Next<\/em><em>&gt;<\/em> again once you&#8217;ve populated that \u2013 again, NMC will query and confirm the validity of the entered details before it lets you progress:<\/p>\n<p><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5276\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_5.png\" alt=\"External Authentication 5\" width=\"587\" height=\"740\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_5.png 587w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_5-237x300.png 237w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\" \/><\/a><\/p>\n<p>You&#8217;ll then be prompted to confirm which servers you want to distribute the&nbsp;authority file to \u2013 in my case, since GST services are running on the same host as the backup server itself, it&#8217;s two instances of&nbsp;the same server, NetWorker and NMC. The&nbsp;distribution&nbsp;<em>should<\/em> log as follows:<\/p>\n<p><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5277\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_6.png\" alt=\"External Authentication 6\" width=\"589\" height=\"744\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_6.png 589w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_6-237x300.png 237w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/a><\/p>\n<p>Click Finish, but whatever you do, <strong>don&#8217;t<\/strong> yet exit NMC. There&#8217;s a few more bits and pieces you need to do. Specifically, you have to do the following:<\/p>\n<ol>\n<li>Add <em>at least<\/em>&nbsp;the referenced security console administrator user (from above) as a user in NMC, assigning the user all security roles.<\/li>\n<li>Equally, add that user (e.g., user=pmdg,host=<em>hostName<\/em>) to the NetWorker Application&nbsp;Administration list (within the NetWorker Administration console).<\/li>\n<li><em>Test<\/em> the login of that user using another browser or&nbsp;RDP session. Once you exit the&nbsp;console session you&#8217;ve been using,&nbsp;<em>internally defined accounts<\/em> will be disabled. (In fact, they actually already&nbsp;<em>are<\/em>, but because this session remains authenticated while you remain connected.)<\/li>\n<\/ol>\n<p>In my testing, I found that (at least with OSX 10.9 Server LDAP), I couldn&#8217;t&nbsp;successfully define administrative&nbsp;NetWorker control via the&nbsp;<em>External Roles<\/em> field in the&nbsp;User Groups list, viz.:<\/p>\n<p><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5278\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_7.png\" alt=\"External Authentication 7\" width=\"669\" height=\"602\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_7.png 669w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2014\/08\/external_authentication_7-300x269.png 300w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><\/a><\/p>\n<p>That is, it wasn&#8217;t sufficient to define &#8216;group=nsradmin&#8217; or an external role of &#8216;nsradmin&#8217; to grant NetWorker administrative rights to anyone in that external group. (I suspect as much as&nbsp;anything that this is a peculiarity between the operation of OS X 10.9 Server directory services and NMC than a failing in NMC itself.)<\/p>\n<p>Even with the slightly less integrated approach, where administrative accounts will need to be named individually within the User group for NetWorker, there are still definite advantages of external&nbsp;authentication integration:<\/p>\n<ol>\n<li>Reducing number of passwords you have to remember in your overall environment<\/li>\n<li>Auditor satisfaction that an account disabled in directory services will be disabled from NMC access<\/li>\n<li>Auditor satisfaction of named user account tracking (rather than local-to-NMC and possibly generic&nbsp;accounts)&nbsp;in NMC<\/li>\n<\/ol>\n<p>In case you&#8217;re wondering \u2013 if someone with&nbsp;a directory account tries to log in and there&nbsp;<em>hasn&#8217;t<\/em> been an account defined in NMC, NMC will automatically create&nbsp;the account, but&nbsp;<em>not<\/em> assign any privileges to it. This allows a previously authenticated administrator to quickly edit the privileges.<\/p>\n<p>One&nbsp;final note &#8211; if you do happen to mess up the authentication process and can&#8217;t log in, the&nbsp;short-term solution is quite straight forward:<\/p>\n<ul>\n<li>Stop the NetWorker Management Console services<\/li>\n<li>On the NMC server, touch under the Management Console &#8216;cst&#8217; directory a file called &#8216;authoverride&#8217;.<\/li>\n<li>Restart the NMC services<\/li>\n<li>Log in as administrator<\/li>\n<li>Either switch back to local authentication, or adjust the external roles\/etc as appropriate<\/li>\n<li>Stop NMC services<\/li>\n<li>Remove the &#8216;authoverride&#8217; file<\/li>\n<li>Restart the NMC services<\/li>\n<li>Verify it&#8217;s working<\/li>\n<\/ul>\n<p>Keeping all that in mind, it&#8217;s relatively straight-forward to jump into the realm of external user authentication with NMC \u2013 and that procedure above is your get-out-of-gaol card if for some reason, your directory services goes down.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the least used features in NetWorker is the option for external authentication of user&nbsp;accounts for use with NMC.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16,21],"tags":[1185,1187,1186,1184,638],"class_list":["post-5271","post","type-post","status-publish","format-standard","hentry","category-networker","category-security","tag-active-directory","tag-authentication","tag-external-authentication","tag-ldap","tag-nmc"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-1n1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/5271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/comments?post=5271"}],"version-history":[{"count":6,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/5271\/revisions"}],"predecessor-version":[{"id":7453,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/5271\/revisions\/7453"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=5271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=5271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=5271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}