samba_dnsupdate crashed with RuntimeError in get_credentials(): kinit for INTEL$@REALM failed (Cannot contact any KDC for requested realm)

Bug #809638 reported by Ratko
148
This bug affects 22 people
Affects Status Importance Assigned to Milestone
samba
Confirmed
Medium
samba4 (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Try to install samba 4

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: samba4 4.0.0~alpha15.dfsg1-1ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-4.5-generic-pae 3.0.0-rc6
Uname: Linux 3.0.0-4-generic-pae i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Tue Jul 12 23:59:51 2011
ExecutablePath: /usr/sbin/samba_dnsupdate
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110704.1)
InterpreterPath: /usr/bin/python2.7
ProcCmdline: python /usr/sbin/samba_dnsupdate
ProcEnviron: PATH=(custom, no user)
PythonArgs: ['/usr/sbin/samba_dnsupdate']
SourcePackage: samba4
Title: samba_dnsupdate crashed with RuntimeError in get_credentials(): kinit for INTEL$@REALM failed (Cannot contact any KDC for requested realm)
UpgradeStatus: Upgraded to oneiric on 2011-07-09 (3 days ago)
UserGroups:

Revision history for this message
Ratko (arheopterics) wrote :
tags: removed: need-duplicate-check
Andreas Moog (ampelbein)
visibility: private → public
Changed in samba4 (Ubuntu):
status: New → Confirmed
Jelmer Vernooij (jelmer)
Changed in samba4 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
tags: added: precise
Changed in samba:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Hanine HAMZIOUI (hanynowsky) wrote :

I confirm the bug for Quantal AMD64 :
I posted details here:
https://bugs.launchpad.net/ubuntu/+source/samba4/+bug/1049834

Revision history for this message
CSRedRat (csredrat) wrote :

Ubuntu 13.04 affected.

Revision history for this message
CSRedRat (csredrat) wrote :

Fixed in Samba 4.0.3?

Revision history for this message
John Marco (smb4) wrote :

Not using ubuntu, but this issue is happening to me and seemingly to a lot of folks.
I think I've found the cause.

In my case, it was a matter of incorrectly configured DNS causing creds.get_named_ccache()
to fail to find the KDC with which to obtain credentials. No core is being dumped in my case;
I was just getting this famous stack dump when trying to do:
    /usr/local/samba/sbin/samba_dnsupdate --verbose --all-names
as is suggested in the how-to I was reading to set up Samba.

A couple minutes with strace revealed that it was trying to look up vmnet-dc1.vmnet.us
using my upstream ISP's name server. At first I just put 127.0.0.1 in the /etc/krb.conf for
the kdc and admin_server settings in the [realms] section. This got me past the stacktrace
but I was stilling getting a lot of '. .. blah blah blah not found' errors. Then I realized that
I had left my ISP DNS in /etc/resolv.conf when I was wget-ing a needed source tarball, and
forgot to set it back to 127.0.0.1 (to use the samba-populated DNS server locally).
Herp derp derp! :) So I set resolv.conf to point at 127.0.0.1 and set krb5.conf to use the
correct DNS names for kdc, etc. Bingo! It now works perfectly.

Bottom line with this "bug" I think is that you need to be VERY careful to set up DNS
right or things will fail. (DNS tends to be that way)

/etc/resolv.conf:
------------ snip snip -------------------
search vmnet.us
nameserver 127.0.0.1
------------ snip snip -------------------

/etc/krb5.conf
------------ snip snip -------------------
[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 default_realm = VMNET.US
 dns_lookup_realm = false
 dns_lookup_kdc = true
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true

[realms]
 VMNET.US = {
  kdc = vmnet-dc1.vmnet.us
  admin_server = vmnet-dc1.vmnet.us
 }

[domain_realm]
 .vmnet.us = VMNET.US
 vmnet.us = VMNET.US
------------ snip snip -------------------

Revision history for this message
Daniel Griswold (daniel-griswoldcomputing) wrote :

Also affecting 13.04. Using internal DNS server. Setting the nameserver to 127.0.0.1 doesn't fix because the records are not present in the internal DNS server.

Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring

Linux <hostname> 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:19:42 UTC 2013 i686 i686 i686 GNU/Linux

ii libsamba-credentials0:i386 4.0.0+dfsg1-1ubuntu1 i386 Samba Credentials management library
ii libsamba-hostconfig0:i386 4.0.0+dfsg1-1ubuntu1 i386 Samba host configuration library
ii libsamba-policy0:i386 4.0.0+dfsg1-1ubuntu1 i386 Samba policy management
ii libsamba-util0:i386 4.0.0+dfsg1-1ubuntu1 i386 Samba utility function library
ii python-samba 4.0.0+dfsg1-1ubuntu1 i386 Python bindings for Samba
ii samba-common 2:3.6.9-1ubuntu1 all common files used by both the Samba server and client
ii samba-common-bin 2:3.6.9-1ubuntu1 i386 common files used by both the Samba server and client
ii samba-dsdb-modules 4.0.0+dfsg1-1ubuntu1 i386 Samba Directory Services Database
ii samba4 4.0.0+dfsg1-1ubuntu1 i386 SMB/CIFS file, NT domain and active directory server (version 4)
ii samba4-common-bin 4.0.0+dfsg1-1ubuntu1 i386 Samba 4 common files used by both the server and the client

  /usr/sbin/samba_dnsupdate: Traceback (most recent call last):
[2013/07/27 00:51:36, 0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate: File "/usr/sbin/samba_dnsupdate", line 507, in <module>
[2013/07/27 00:51:36, 0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate: get_credentials(lp)
[2013/07/27 00:51:36, 0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate: File "/usr/sbin/samba_dnsupdate", line 121, in get_credentials
[2013/07/27 00:51:36, 0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate: creds.get_named_ccache(lp, ccachename)
[2013/07/27 00:51:36, 0] ../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate: RuntimeError: kinit for <hostname>$@<DOMAIN.LOCAL> failed (Cannot contact any KDC for requested realm)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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