realmd samba-common-bin dependencies

Bug #1333694 reported by DrF
116
This bug affects 26 people
Affects Status Importance Assigned to Milestone
realmd (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Won't Fix
Undecided
Unassigned

Bug Description

realmd fails to install samba-common-bin package because of dependencies.

The executed command on a fresh installed server:
---------
# apt-get install realmd
# realm --verbose join -U admin domain.example.com
* Resolving: _ldap._tcp.domain.example.com
 * Performing LDAP DSE lookup on: xx.xx.xx.18
 * Performing LDAP DSE lookup on: xx.xx.xx.17
 * Successfully discovered: domain.example.com
Password for admin:
 * Unconditionally checking packages
 * Resolving required packages
 * Installing necessary packages: samba-common-bin, sssd-tools, sssd, libnss-sss, libpam-sss
 ! Failed to enroll machine in realm: The following packages have unmet dependencies:

samba-common-bin: Depends: samba-common (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.1 is to be installed
                  Depends: python2.7:any but it is a virtual package
                  Depends: samba-libs (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.1 is to be installed

realm: Couldn't join realm: Failed to enroll machine in realm. See diagnostics.
------------

The sources list of the server:
------------
# deb http://archive.ubuntu.com/ubuntu/ trusty main restricted

# deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
# deb http://security.ubuntu.com/ubuntu trusty-security main restricted
# http://trusty-repository.nbg.atrada.net:8088/ubuntu trusty atrada

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty universe
deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
---------

It seems like realm tries to install samba-common-bin from the trusty repository while apt tries to satifsfy the dependencies from the trusty-updates repository.

trusty: samba-common-bin (2:4.1.6+dfsg-1ubuntu2)
trusty-updates: samba-common-bin (2:4.1.6+dfsg-1ubuntu2.14.04.1)

Tags: trusty utopic
Revision history for this message
DrF (z-launchpad-net-the-huberts-net) wrote :

here the lines from /var/log/syslog:

-----
Jun 24 13:55:43 nbg-web13 AptDaemon.PackageKit: INFO: CreateTransaction() was called
Jun 24 13:55:43 nbg-web13 AptDaemon.PackageKit: INFO: Initializing PackageKit transaction
Jun 24 13:55:43 nbg-web13 AptDaemon.PackageKit: INFO: SetHints() was called: ['locale=C', 'background=false', 'interactive=false']
Jun 24 13:55:43 nbg-web13 AptDaemon.PackageKit: INFO: Resolve() was called: ['sssd-tools', 'sssd', 'libnss-sss', 'libpam-sss', 'samba-common-bin']
Jun 24 13:55:43 nbg-web13 AptDaemon.Worker: INFO: Simulating trans: /org/debian/apt/transaction/f7644f3b7ca94867b265291f88162c0a
Jun 24 13:55:43 nbg-web13 AptDaemon.Worker: INFO: Processing transaction /org/debian/apt/transaction/f7644f3b7ca94867b265291f88162c0a
Jun 24 13:55:44 nbg-web13 AptDaemon.Worker: INFO: Finished transaction /org/debian/apt/transaction/f7644f3b7ca94867b265291f88162c0a
Jun 24 13:55:44 nbg-web13 AptDaemon.PackageKit: INFO: CreateTransaction() was called
Jun 24 13:55:44 nbg-web13 AptDaemon.PackageKit: INFO: Initializing PackageKit transaction
Jun 24 13:55:44 nbg-web13 AptDaemon.PackageKit: INFO: SetHints() was called: ['locale=C', 'background=false', 'interactive=false', 'frontend-socket=/var/cache/realmd/gpk-f54bd85a80054491ac6db444263e8927.socket']
Jun 24 13:55:44 nbg-web13 AptDaemon.PackageKit: INFO: InstallPackages() was called: only-trusted, ['sssd-tools;1.11.5-1ubuntu3;amd64;Ubuntu', 'sssd;1.11.5-1ubuntu3;amd64;Ubuntu', 'libnss-sss;1.11.5-1ubuntu3;amd64;Ubuntu', 'libpam-sss;1.11.5-1ubuntu3;amd64;Ubuntu', 'samba-common-bin;2:4.1.6+dfsg-1ubuntu2.14.04.1;amd64;Ubuntu', 'samba-common-bin;2:4.1.6+dfsg-1ubuntu2;amd64;Ubuntu']
Jun 24 13:55:44 nbg-web13 AptDaemon.Worker: INFO: Simulating trans: /org/debian/apt/transaction/f54bd85a80054491ac6db444263e8927
Jun 24 13:55:45 nbg-web13 AptDaemon.Worker: INFO: Committing packages: dbus.Array(['sssd-tools=1.11.5-1ubuntu3', 'sssd=1.11.5-1ubuntu3', 'libnss-sss=1.11.5-1ubuntu3', 'libpam-sss=1.11.5-1ubuntu3', 'samba-common-bin=2:4.1.6+dfsg-1ubuntu2.14.04.1', 'samba-common-bin=2:4.1.6+dfsg-1ubuntu2'], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s')), dbus.Array([], signature=dbus.Signature('s'))
---------

Revision history for this message
DrF (z-launchpad-net-the-huberts-net) wrote :

The installed version of realmd is 0.15.0-1 amd64
Ubuntu trusty 14.04

# dpkg -l realmd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==================================-======================-======================-==========================================================================
ii realmd 0.15.0-1 amd64 DBus service for configuring kerberos and other online identities

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in realmd (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian R (brianr-5) wrote :

Is there a workaround?

Revision history for this message
Elias Probst (eliasp) wrote :

Workaround:

- make sure the required packages are installed
- uncomment the line "samba-common-bin = /usr/bin/net" from /usr/lib/realmd/realmd-distro.conf
- stop realmd (it will be automatically restarted when needed): "sudo killall realmd"

Try again…

Revision history for this message
DrF (z-launchpad-net-the-huberts-net) wrote :

My Workaround was to disable the "trusty-updates" repositories in /etc/apt/sources.list, run the setup and later re-enable "trusty-updates"

Revision history for this message
Thiago Martins (martinx) wrote :

My workaround (I think) was to install packagekit, but I'm not 100% sure... I'll test it more this week...

Revision history for this message
Thiago Martins (martinx) wrote :

BTW, yes, installing packagekit fixed the problem... I did:

killall aptd
apt-get install packagekit

Then, `realm -v join domain.com -U Administrator` worked!

Revision history for this message
Thiago Martins (martinx) wrote :

This BUG might be related to this: https://bugs.launchpad.net/aptdaemon/+bug/1319454

Revision history for this message
Thiago Martins (martinx) wrote :

Also, instead of installing packagekit (I mean, before installing it), I tried to add the following lines to /etc/realmd.conf:

--
[service]
automatic-install = no
--

But it did not fixed the problem... I previously installed all the packages by hand, still did not worked... With packagekit installed, it goes smoothly...

Revision history for this message
DrF (z-launchpad-net-the-huberts-net) wrote :

Installing packagekit improves the situation, but I also must install adcli, then everything works:

killall aptd
apt-get install packagekit adcli
reaml join ...

Revision history for this message
Myles Gray (mutant-tractor) wrote :

Bug still present - needed to install packagekit to allow realm join to complete successfully.

Revision history for this message
Veiko (veiko-ohbugger) wrote :

Wow this is still bugged after so much time.

I ended up on this page after doing a fresh ubuntu 14.01 install with all updates. Needed to join it into a domain, instead i got this after typing realm join --verbose mydomain.me

And yes, the simple fix works - replacing aptd with packagekit, as other people already pointed out.

Revision history for this message
Lorenzo (lore-cfr) wrote :

Still here in 14.10:

root@samba:~# realm --verbose join ad.testbed.com -U Administrator
 * Resolving: _ldap._tcp.ad.testbed.com
 * Performing LDAP DSE lookup on: 192.168.1.25
 * Successfully discovered: ad.testbed.com
Password for Administrator:
 * Unconditionally checking packages
 * Resolving required packages
 * Installing necessary packages: samba-common-bin
 ! Failed to enroll machine in realm: The version 2:4.1.11+dfsg-1ubuntu2/Ubuntu of samba-common-bin isn't available.
realm: Couldn't join realm: Failed to enroll machine in realm. See diagnostics.

tags: added: trusty utopic
Revision history for this message
Alex Hart (alexjhart) wrote :

If I apt-get install packagekit before installing realmd and running join, everything works. Seems like the realmd package should just have packagekit dependency to resolve this?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I believe this is fixed since quite some time now. At some point software-properties-common was added to the ubuntu-server metapackage, and that pulls in packagekit.

Still, if you don't have it installed, realm complains like this:
root@g-adclient1:~# realm -v join ad1.example.com
 * Resolving: _ldap._tcp.ad1.example.com
 * Performing LDAP DSE lookup on: 10.51.0.5
 * Successfully discovered: ad1.example.com
Password for Administrator:
 * Unconditionally checking packages
 * Resolving required packages
 ! PackageKit not available: The name org.freedesktop.PackageKit was not provided by any .service files
 ! Necessary packages are not installed: sssd-tools sssd libnss-sss libpam-sss adcli
realm: Couldn't join realm: Necessary packages are not installed: sssd-tools sssd libnss-sss libpam-sss adcli

If selecting winbind, then:
root@g-adclient1:~# realm -v join ad1.example.com --client-software=winbind
 * Resolving: _ldap._tcp.ad1.example.com
 * Performing LDAP DSE lookup on: 10.51.0.5
 * Successfully discovered: ad1.example.com
Password for Administrator:
 * Unconditionally checking packages
 * Resolving required packages
 ! PackageKit not available: The name org.freedesktop.PackageKit was not provided by any .service files
 ! Necessary packages are not installed: winbind libpam-winbind samba-common-bin
realm: Couldn't join realm: Necessary packages are not installed: winbind libpam-winbind samba-common-bin

So you can either install those packages, or install packagekit and let it do it for you:
root@g-adclient1:~# realm -v join ad1.example.com --client-software=winbind
 * Resolving: _ldap._tcp.ad1.example.com
 * Performing LDAP DSE lookup on: 10.51.0.5
 * Successfully discovered: ad1.example.com
Password for Administrator:
 * Unconditionally checking packages
 * Resolving required packages
 * Installing necessary packages: samba-common-bin libpam-winbind winbind
 * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.WZ5TQ0 -U Administrator ads join ad1.example.com
Enter Administrator's password:
Using short domain name -- AD1
Joined 'G-ADCLIENT1' to dns domain 'ad1.example.com'
 * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.WZ5TQ0 -U Administrator ads keytab create
Enter Administrator's password:
 * /usr/sbin/update-rc.d winbind enable
 * /usr/sbin/service winbind restart
 * Successfully enrolled machine in realm

Since it tells you what is missing if packagekit isn't installed, and doesn't crash in a bad way, I think adding a dependency or even a recommends on packagekit is too hard, but I can settle for a Suggests.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

All this being said, on trusty this bug is valid and still happens. Likely because there are many samba updates available, and it is incorrectly selecting an old one:
root@trusty:~# apt-cache policy samba-common
samba-common:
  Installed: (none)
  Candidate: 2:4.3.11+dfsg-0ubuntu0.14.04.20
  Version table:
     2:4.3.11+dfsg-0ubuntu0.14.04.20+esm8 0
       -32768 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main amd64 Packages
     2:4.3.11+dfsg-0ubuntu0.14.04.20 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     2:4.1.6+dfsg-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Yet it selected 2:4.1.6+dfsg-1ubuntu2.

Xenial (which has 0.16.2) and later behave like in my previous comment. It stops if the required packages are not installed, and packagekit is also not available, and if packagekit is available, it installs what is needed without failing.

Since trusty has reached the normal EOL, I suggest to use the workaround that is to manually install the required packages before invoking the realm tool.

Changed in realmd (Ubuntu Trusty):
status: New → Won't Fix
Changed in realmd (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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