{"id":226,"date":"2015-05-19T23:41:43","date_gmt":"2015-05-19T22:41:43","guid":{"rendered":"http:\/\/www.troliver.com\/?p=226"},"modified":"2015-05-20T10:26:55","modified_gmt":"2015-05-20T09:26:55","slug":"trouble-in-sambadise-pbis-with-active-directory-issues","status":"publish","type":"post","link":"https:\/\/www.troliver.com\/?p=226","title":{"rendered":"Trouble in Sambadise; Issues with PBIS Active Directory and Samba"},"content":{"rendered":"<p><a href=\"http:\/\/www.troliver.com\/?p=189\">Continuing from the last post<\/a>, with the original default configuration you could\u00a0browse shares on the server, but with the updated configuration you can&#8217;t.<\/p>\n<p><a href=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/share5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-194\" src=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/share5.png\" alt=\"share5\" width=\"439\" height=\"366\" srcset=\"https:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/share5.png 439w, https:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/share5-300x250.png 300w\" sizes=\"(max-width: 439px) 100vw, 439px\" \/><\/a><\/p>\n<p>We have joined the server to Active Directory and there are likely no issues reported with running <em>pbis status<\/em>,\u00a0so what could\u00a0be wrong?<\/p>\n<p>I had a look through some logs in\u00a0<em>\/var\/log\/samba\/, <\/em>where\u00a0there are logs for each machine that has tried to access a samba share. Open one of them and you&#8217;ll possibly see\u00a0four errors occur (with the timestamp lines removed)<\/p>\n<pre class=\"lang:sh decode:true\">  get_schannel_session_key: could not fetch trust account password for domain 'Troliver'\r\n\r\n  cli_rpc_pipe_open_schannel: failed to get schannel session key from server domaincontroller.troliver.com for domain Troliver.\r\n\r\n  connect_to_domain_password_server: unable to open the domain client session to machine domaincontroller.troliver.com. Error was : NT_STATUS_CANT_ACCESS_DOMAIN_INFO.\r\n\r\n  domain_client_validate: Domain password server not available.\r\n<\/pre>\n<p>This is crazy; it seems like there is something wrong with joining the domain &#8211; but we are already on the domain and can change users! Ah ha, but I haven&#8217;t yet\u00a0run the Samba-Interop installer, which\u00a0allows you to integrate PBIS authentication with Samba.<\/p>\n<p><a href=\"http:\/\/download1.beyondtrust.com\/Technical-Support\/Downloads\/files\/pbise\/Manuals\/PBIS_Samba_Integration_Guide_V8.0.pdf\">Following this guide<\/a>,\u00a0for version 8.x,\u00a0I ran\u00a0<em>\/opt\/pbis\/bin\/samba-interop-install\u00a0<\/em> &#8211; but this failed!<\/p>\n<pre class=\"lang:sh decode:true \">Found smbd version 4.1.6-Ubuntu\r\nUnsupported smbd version 4.1.6-Ubuntu\r\nError: ERROR_PRODUCT_VERSION<\/pre>\n<p>If anyone\u00a0asks what the difference\u00a0is when using Ubuntu over CentOS, one answer you might commonly find on Google is\u00a0to do with how &#8220;up-to-date&#8221; Ubtuntu is, with new and updated packages all the time, compared to CentOS which may be lagging behind with older, <em>more stable<\/em>, releases. So at the time of writing, Ubuntu&#8217;s implementation of Samba &#8211; as installed by default &#8211; is at version 4.16 and PBIS is at 8.2.1.something. Both are the latest; yet they don&#8217;t work together when using the<em> samba-interop-install\u00a0<\/em>to link PBIS with Samba, which only supports versions up to 3.5 it seems.<\/p>\n<p>In fact, this seems to be a <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/likewise-open\/+bug\/992970\">problem<\/a> that has been <a href=\"http:\/\/askubuntu.com\/questions\/302432\/sambapowerbroker-aka-likewise-open-integration-not-working\">around<\/a> for a <a href=\"http:\/\/ubuntuforums.org\/showthread.php?t=2219245&amp;page=3\">while<\/a>. Its for\u00a0PowerBroker to figure out and fix; but actually, they even only discuss version 3 in their installation guide. So we probably can&#8217;t use Samba 4 at all and there is no indication that that will change. In the meantime, you have to use an older version of Samba. But how?<\/p>\n<h2>[The hard way that I didn&#8217;t end up using] &#8211; Make Samba yourself<\/h2>\n<ul>\n<li>For this, you&#8217;ll need to have installed <em>gcc<\/em> and <em>make. <\/em>You then have to remove Samba, which should also prompt you to remove libnss-winbind, libpam-winbind, samba and winbind. Use <em>apt-get purge<\/em>\u00a0to get rid of the local repository files too.<\/li>\n<li>Next, you can find an appropriate version of Samba 3 to compile <a href=\"https:\/\/download.samba.org\/pub\/samba\/\">here<\/a>\u00a0(probably version 3.5 or below).<\/li>\n<li>Download it with\u00a0<em>wget (package address)<\/em>, use <em>tar -xvzf <\/em>to extract\u00a0it, go to the <em>source3<\/em> folder and run <em>.\/configure.\u00a0<\/em>This can take a while..<\/li>\n<li>Run <em>make<\/em>, more time again.<\/li>\n<li>Finally do <em>make install<\/em><\/li>\n<li>If it all completes successfully, you can delete all of these files that you downloaded and extracted<\/li>\n<li>The installation process should have put Samba into <em>\/usr\/local\/<\/em> &#8211; which is where any newly compiled stuff\u00a0goes by default<\/li>\n<li>After this, you need to do a few more things, but I found a much easier way to do it instead; see below.<\/li>\n<\/ul>\n<h2>[The easier way that I ended up using] &#8211; Install Samba from another repository<\/h2>\n<p>It looks like there is a way to get this working with an older version of Samba, build for Ubuntu 12. Thankfully, it worked fine &#8211; so referring to <a href=\"http:\/\/www.enterprisesamba.com\/samba-packages\/ubuntu\/\">this link,<\/a> the following had to be done:<\/p>\n<ul>\n<li>Edit\u00a0<em>\/etc\/apt\/sources.list\u00a0<\/em>to include the\u00a0line &#8220;<em>deb http:\/\/ftp.sernet.de\/pub\/samba\/3.5\/debian squeeze main&#8221;.\u00a0<\/em>This will add the\u00a0<em>sernet<\/em> server as a package repository.<\/li>\n<li>Attempt to perform <em>\u00a0apt-get update,\u00a0<\/em>which will initially fail since you need to have a key to authenticate with the sernet server<\/li>\n<li>As root (and you have to be, for this), write these two lines:\n<ul>\n<li><span class=\"lang:default decode:true  crayon-inline\">gpg &#8211;export &#8211;armor F4428B1A | apt-key add &#8211;<\/span><\/li>\n<li><span class=\"lang:default decode:true  crayon-inline\">gpg &#8211;keyserver wwwkeys.pgp.net &#8211;recv-keys F4428B1A;\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<li>You should now be able to perform an update successfully and install samba from this new repository with apt-get install sernet-samba.<\/li>\n<li>After this, all other commands should work the same as it would with the original distribution of Ubuntu; you don&#8217;t have to use sernet-samba for every samba command you write<\/li>\n<\/ul>\n<p>Running the\u00a0<em>samba-interop-install<\/em>\u00a0should now work fine and, at least in my case, everything fell into place. Hopefully everything will work better now for other people too &#8211; but if anyone has any issues, comments or suggestions, please feel free to discuss them or to\u00a0get in touch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuing from the last post, with the original default configuration you could\u00a0browse shares on the server, but with the updated configuration you can&#8217;t. We have joined the server to Active Directory and there are likely no issues reported with running pbis status,\u00a0so what could\u00a0be wrong? I had a look through some logs in\u00a0\/var\/log\/samba\/, where\u00a0there are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[21],"tags":[10,20,45,41,42,46],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6PQZ3-3E","_links":{"self":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/226"}],"collection":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=226"}],"version-history":[{"count":5,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":241,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/226\/revisions\/241"}],"wp:attachment":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}