{"id":29,"date":"2011-06-06T19:48:09","date_gmt":"2011-06-07T00:48:09","guid":{"rendered":"https:\/\/www.falatic.com\/?p=29"},"modified":"2011-06-06T21:18:58","modified_gmt":"2011-06-07T02:18:58","slug":"problems-with-samba4-when-updating-from-ubuntu-10-10-to-11-04","status":"publish","type":"post","link":"https:\/\/www.falatic.com\/index.php\/29\/problems-with-samba4-when-updating-from-ubuntu-10-10-to-11-04","title":{"rendered":"Problems updating\/installing samba4 in Ubuntu 11.04? Read here!"},"content":{"rendered":"<p>I recently upgraded my Ubuntu installation from 10.10 to 11.04 and the samba4 package had big problems being updated or installed. I finally found a way to properly install it, so hopefully this will be helpful to others.<\/p>\n<p>First, the tail of the installation output for the samba4 package:<\/p>\n<p style=\"padding-left: 30px;\">&#8230;<em><br \/>\nmodule samba_dsdb initialization failed : No such object<\/em><br \/>\n<em>Unable to load modules for \/var\/lib\/samba\/private\/sam.ldb: dsdb_module_search_dn: did not find base dn @ROOTDSE (0 results)<\/em><br \/>\n<em>Traceback (most recent call last):<\/em><br \/>\n<em> File &#8220;\/usr\/share\/samba\/setup\/upgradeprovision&#8221;, line 1597, in &lt;module&gt;<\/em><br \/>\n<em> ldbs = get_ldbs(paths, creds, session, lp)<\/em><br \/>\n<em> File &#8220;\/usr\/lib\/python2.7\/dist-packages\/samba\/upgradehelpers.py&#8221;, line 159, in get_ldbs<\/em><br \/>\n<em> ldbs.sam = SamDB(paths.samdb, session_info=session, credentials=creds, lp=lp, options=[&#8220;modules:samba_dsdb&#8221;])<\/em><br \/>\n<em> File &#8220;\/usr\/lib\/python2.7\/dist-packages\/samba\/samdb.py&#8221;, line 53, in __init__<\/em><br \/>\n<em> options=options)<\/em><br \/>\n<em> File &#8220;\/usr\/lib\/python2.7\/dist-packages\/samba\/__init__.py&#8221;, line 110, in __init__<\/em><br \/>\n<em> self.connect(url, flags, options)<\/em><br \/>\n<em> File &#8220;\/usr\/lib\/python2.7\/dist-packages\/samba\/samdb.py&#8221;, line 66, in connect<\/em><br \/>\n<em> options=options)<\/em><br \/>\n<em>_ldb.LdbError: (80, &#8216;dsdb_module_search_dn: did not find base dn @ROOTDSE (0 results)&#8217;)<\/em><br \/>\n<em>dpkg: error processing samba4 (&#8211;configure):<\/em><br \/>\n<em> subprocess installed post-installation script returned error exit status 1<\/em><br \/>\n<em>Errors were encountered while processing:<\/em><br \/>\n<em> samba4<\/em><br \/>\n<em>E: Sub-process \/usr\/bin\/dpkg returned an error code (1)<\/em><\/p>\n<p>I first looked around&#8230; a few people had reported similar issues but the answers weren&#8217;t useful. The most common one in several places was, &#8220;Why are you using samba 4? It&#8217;s experimental!&#8221; I&#8217;ve heard that only samba4 works (well | at all?) with Windows 7 protocols. Not sure about that but it was clear that downgrading to regular samba (v3) wasn&#8217;t an ideal solution. (Note: it&#8217;s been a while since I dealt with interop issues on samba&#8230; I apparently originally installed samba4 in 10.04 or 10.10 as part of trying to talk with Windows 7.)<\/p>\n<p>Finally, having done due diligence, <a title=\"Samba4 failed install report\" href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/samba4\/+bug\/792189\" target=\"_blank\">I posted my problem as a bug report<\/a>. After a few iterations it was mentioned that I should &#8220;purge&#8221; the samba database. Hmm. I didn&#8217;t see that mentioned anywhere else when I searched before (on my particular install error). So I tried it and lo and behold! The purge worked!<\/p>\n<p><strong>So, to install\/upgrade samba4 on Ubuntu 11.04, you can try the following (<span style=\"color: #ff0000;\">Disclaimer: always back up first!<\/span>):<\/strong><\/p>\n<pre># Attempt to install samba4:\r\n\r\nsudo apt-get install samba4\r\n\r\n# Assuming it fails to install correctly\r\n#(\"_ldb.LdbError: (80, 'dsdb_module_search_dn: did not find\r\n# base dn @ROOTDSE (0 results)')\" is the error I was dealing\r\n# with), purge samba4:\r\n\r\nsudo apt-get purge samba4\r\n\r\n# Finally, attempt to install samba4 again:\r\n\r\nsudo apt-get install samba4<\/pre>\n<p>That should do it. If it doesn&#8217;t do it, maybe you are having a different issue.<\/p>\n<p><strong><span style=\"color: #0000ff;\">EDIT:<\/span> There&#8217;s some useful info on <a href=\"http:\/\/www.liberiangeek.net\/2011\/04\/share-home-folder-ubuntu-11-04-natty-narwhal\/\" target=\"_blank\">this page<\/a> about configuring Ubuntu 11.04 Samba so as to play nice with Windows<\/strong>. Also, your smb.conf is probably in \/etc\/samba&#8230; <em><strong>installing samba doesn&#8217;t install a default config file<\/strong><\/em> even if this one is absent. I&#8217;m not sure why yet but I&#8217;d like to know since my existing one is throwing warnings when you run &#8220;samba&#8221; as a command (several &#8220;unknown parameters&#8221; are getting &#8220;ignored&#8221;&#8230; probably fine but I wish I had a clean smb.conf for this release to compare against.)<\/p>\n<p><strong><span style=\"color: #0000ff;\">EDIT2:<\/span> There&#8217;s <a href=\"http:\/\/www.liberiangeek.net\/2011\/04\/share-files-folders-ubuntu-11-04-natty-narwhal\/\" target=\"_blank\">another tutorial here<\/a> about Ubuntu 11.04, Samba 3 and sharing with Windows.<\/strong><\/p>\n<!-- wpsso rrssb get buttons: buttons on archive option not enabled -->\n","protected":false},"excerpt":{"rendered":"<p>I recently upgraded my Ubuntu installation from 10.10 to 11.04 and the samba4 package had big problems being updated or installed. I finally found a way to properly install it, <a href=\"https:\/\/www.falatic.com\/index.php\/29\/problems-with-samba4-when-updating-from-ubuntu-10-10-to-11-04\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[44,52,48,45,51,50,49,46,47,19],"class_list":["entry","author-marty","post-29","post","type-post","status-publish","format-standard","category-uncategorized","tag-11-04","tag-error","tag-ldberror","tag-natty","tag-problem","tag-purge","tag-rootdse","tag-samba","tag-samba4","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":0,"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.falatic.com\/index.php\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}