likewise-open: blows up session when joining the domain

Bug #222224 reported by Alex Mauer on 2008-04-25
Affects Status Importance Assigned to Milestone
likewise-open (Ubuntu)
Thierry Carrez
Thierry Carrez

Bug Description

Binary package hint: likewise-open

Logged in as a local user, I used 'domainjoin-cli' to join the windows domain. This instantly killed the gnome panel, dbus, and the NetworkManager applet, and therefore networking.

Now domainjoin-gui and domainjoin-cli indicate that I am joined to the domain, yet likewise's winbind log says things like:

[2008/04/25 18:24:58, 0] libsmb/cliconnect.c:cli_session_setup_spnego(856)
  Kinit failed: Preauthentication failed
[2008/04/25 18:25:00, 0] libsmb/cliconnect.c:cli_session_setup_spnego(856)
  Kinit failed: Client not found in Kerberos database
[2008/04/25 18:25:00, 1] winbindd/winbindd_util.c:trustdom_recv(258)
  Could not receive trustdoms

'lwiinfo -u' says "Error looking up domain users"

'getent -s lwidentity passwd' returns nothing.

sudo takes forever to do anything.

It seems that the domainjoin utilities are lying through their teeth.

Ubuntu 8.04
Likewise-open 4.0.5

It's looking like a bug. See the following for a short-term workaround.

Steve Langasek (vorlon) wrote :

I can confirm this bug here.

Changed in likewise-open:
status: New → Confirmed
Steve Langasek (vorlon) wrote :

oh, well, I found a pretty clear explanation for why this happens. In domainjoin/scripts/ConfigureLogin:

            /etc/init.d/dbus restart

We probably shouldn't do that, considering the dbus package itself doesn't even do this on upgrades. Here's what the dbus package does instead:

    if [ -e /var/run/dbus/pid ] &&
      ps --no-heading -p $(cat /var/run/dbus/pid) > /dev/null; then
        # trigger an update notification which recommends to reboot
        [ -x /usr/share/update-notifier/notify-reboot-required ] && \
            /usr/share/update-notifier/notify-reboot-required || true
            invoke-rc.d dbus reload || true
        exit 0

Changed in likewise-open:
importance: Undecided → High
Thierry Carrez (ttx) on 2008-09-19
Changed in likewise-open:
assignee: nobody → tcarrez
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package likewise-open - 4.1.2982-0ubuntu1

likewise-open (4.1.2982-0ubuntu1) intrepid; urgency=low

  * Upstream bugfix microrelease (LP: #272134)
  * Replaced no-template-modifications.diff by homedir_setting.patch to
    match upstream patches
  * Added upstream's daemon_restart.patch that removes likewise-open
    self-management of daemon start at boot (LP: #272132)
  * Added --with-dnsupdate configure option to properly register DDNS entries
    on domain join (LP: #272060)
  * Added graceful_dbus_restart.diff patch to fix Gnome session blow-up when
    using GUI to join domain (LP: #222224)

 -- Thierry Carrez <email address hidden> Fri, 19 Sep 2008 15:57:23 +0200

Changed in likewise-open:
status: In Progress → Fix Released
Thierry Carrez (ttx) wrote :

SRU report

Bug impact:
Joining a domain when logged into Gnome, you suffer various breakage as dbus is restarted, from gnome-panel and nautilus reloading to network outage and desktop lock up.

Fix in the development branch:
This was addressed in Intrepid for version 4.1.2982-0ubuntu1, using the same patch that will be applied here.

Minimal patch:
--- likewise-open-4.1.2982-release.orig/domainjoin/scripts/
+++ likewise-open-4.1.2982-release/domainjoin/scripts/
@@ -302,8 +302,18 @@
+ if [ "$distroType" = "Ubuntu" ]; then
+ if [ -e /var/run/dbus/pid ] &&
+ ps --no-heading -p $(cat /var/run/dbus/pid) > /dev/null; then
+ invoke-rc.d dbus reload
+ result=$?
+ else
+ return 0
+ fi
+ else
             /etc/init.d/dbus restart
+ fi
         return $result

NB: You'll need an AD setup to test that (a domain needs to be successfully joined).
$ sudo apt-get install likewise-open likewise-open-gui
System > Administration > Likewise, enter your domain name and click "Join domain"
Enter your AD admin password
Without the fix: dbus is restarted, gnome panels are reloaded, nautilus is restarted, and various additional breakage.
With the fix: dbus is gracefully reloaded, and nothing of that sort happens.

Regression potential:
The patch basically only affects new domain logins so it should not affect existing configurations in upgrades. It reloads dbus rather than restarting it, achieving the wanted refresh in DBUS without the unwanted breakage.

Thierry Carrez (ttx) wrote :

Combined SRU debdiff (with bug 230466 and bug 253394) has been posted on bug 230466.

Martin Pitt (pitti) wrote :

Ack'ed for SRU. For future releases, please get rid of the "dbus restart" entirely, and send this change to upstream. It is *always* wrong to restart D-BUS, regardless of the distribution. It's also unjustified; "reload" is the maximum which should be required, and d-bus has inotify support to pick up new files in /etc/dbus-1/ on the fly.

Changed in likewise-open:
status: New → In Progress
Thierry Carrez (ttx) wrote :

Jerry is already subscribed to our bugs, but I filed anyway.

Thierry Carrez (ttx) on 2008-10-31
Changed in likewise-open:
status: In Progress → Fix Committed
Adam Sommer (asommer) wrote :

Ran through the test case in comment 5, and can confirm the bug is fixed in likewise-open-4.0.5-0ubuntu3.1 and likewise-open-gui-4.0.5-0ubuntu3.1.

If more information is required please let me know.


Launchpad Janitor (janitor) wrote :

This bug was fixed in the package likewise-open - 4.0.5-0ubuntu3.1

likewise-open (4.0.5-0ubuntu3.1) hardy-proposed; urgency=low

  [ Etienne Goyer ]
  * Fixed ugly typo in "Domain Join Authentication" dialog
    (LP: #253394)

  [ Thierry Carrez ]
  * debian/likewise-open.prerm: Leave the domain before uninstalling,
    otherwise you wouldn't be able to login anymore (LP: #230466)
  * debian/patches/graceful_dbus_restart.diff: fix Gnome session blow-up when
    using GUI to join domain (LP: #222224)

 -- Thierry Carrez <email address hidden> Tue, 28 Oct 2008 16:07:40 +0000

Changed in likewise-open:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.