FS#17522 - [samba] Program lacks support for encryption type error
Attached to Project:
Arch Linux
Opened by Peter Csepely (Thief_hu) - Tuesday, 15 December 2009, 19:02 GMT
Last edited by Tobias Powalowski (tpowa) - Sunday, 06 March 2011, 10:12 GMT
Opened by Peter Csepely (Thief_hu) - Tuesday, 15 December 2009, 19:02 GMT
Last edited by Tobias Powalowski (tpowa) - Sunday, 06 March 2011, 10:12 GMT
|
Details
Description:
I use Samba as a domain member in W2K3 AD with some shares, authentication with winbind. After system upgrade: - samba (3.4.3-3 -> 3.4.3-4) - heimdal (1.2.1-7 -> 1.3.1-2) - tdb (3.4.3-3 -> 3.4.3-4) - libldap (2.4.19-1 -> 2.4.20-1) - smbclient (3.4.3-3 -> 3.4.3-4) wbinfo -[u|w] produces "Error looking up domain users" or nothing. In log the following lines appear: winbindd[25642]: [2009/12/15 16:42:18, 0] libads/sasl.c:819(ads_sasl_spnego_bind) winbindd[25642]: kinit succeeded but ads_sasl_spnego_krb5_bind failed: Program lacks support for encryption type winbindd/winbindd_ads.c:127(ads_cached_connection) ads_connect for domain [domain] failed: Program lacks support for encryption type but a "net rpc join -S [PDC] -U [user]" joins successfully. smb.conf: security = DOMAIN [...] password server = [PDC] local master = no domain master = no winbind separator = \\ idmap uid = 10000-20000 idmap gid = 10000-20000 winbind enum users = yes winbind enum groups = yes valid users = [valid user] auth methods = guest, sam, winbind template shell = /bin/bash |
This task depends upon
Errors in log still remains.
More log entries:
==> /var/log/daemon.log <==
Dec 16 09:57:44 ph031 winbindd[12964]: [2009/12/16 09:57:44, 0] winbindd/winbindd_cache.c:2578(initialize_winbindd_cache)
==> /var/log/samba/winbindd.log <==
[2009/12/16 09:57:44, 0] winbindd/winbindd_cache.c:2578(initialize_winbindd_cache)
==> /var/log/daemon.log <==
Dec 16 09:57:44 ph031 winbindd[12964]: initialize_winbindd_cache: clearing cache and re-creating with version number 1
==> /var/log/daemon.log <==
Dec 16 09:57:44 ph031 winbindd[12966]: [2009/12/16 09:57:44, 0] libads/sasl.c:819(ads_sasl_spnego_bind)
==> /var/log/daemon.log <==
Dec 16 09:57:44 ph031 winbindd[12966]: kinit succeeded but ads_sasl_spnego_krb5_bind failed: Program lacks support for encryption type
==> /var/log/samba/winbindd.log <==
[2009/12/16 09:57:44, 1] winbindd/winbindd_util.c:303(trustdom_recv)
Could not receive trustdoms
Any suggestion?
[2009/12/21 09:03:29, 1] libsmb/clikrb5.c:848(cli_krb5_get_ticket)
cli_krb5_get_ticket: krb5_set_default_tgs_ktypes failed (Program lacks support for encryption type)
[2009/12/21 09:03:29, 1] libsmb/clikrb5.c:848(cli_krb5_get_ticket)
cli_krb5_get_ticket: krb5_set_default_tgs_ktypes failed (Program lacks support for encryption type)
[2009/12/21 09:03:29, 0] libads/sasl.c:819(ads_sasl_spnego_bind)
kinit succeeded but ads_sasl_spnego_krb5_bind failed: Program lacks support for encryption type
[2009/12/21 09:03:29, 1] winbindd/winbindd_ads.c:127(ads_cached_connection)
ads_connect for domain [DOMAIN NAME] failed: Program lacks support for encryption type
[2009/12/21 09:03:34, 1] libsmb/clikrb5.c:848(cli_krb5_get_ticket)
cli_krb5_get_ticket: krb5_set_default_tgs_ktypes failed (Program lacks support for encryption type)
[2009/12/21 09:03:34, 1] libsmb/clikrb5.c:848(cli_krb5_get_ticket)
cli_krb5_get_ticket: krb5_set_default_tgs_ktypes failed (Program lacks support for encryption type)
[2009/12/21 09:03:34, 0] libads/sasl.c:819(ads_sasl_spnego_bind)
kinit succeeded but ads_sasl_spnego_krb5_bind failed: Program lacks support for encryption type
[2009/12/21 09:03:34, 1] winbindd/winbindd_ads.c:127(ads_cached_connection)
ads_connect for domain [DOMAIN NAME] failed: Program lacks support for encryption type
[2009/12/21 09:08:34, 1] libsmb/clikrb5.c:848(cli_krb5_get_ticket)
cli_krb5_get_ticket: krb5_set_default_tgs_ktypes failed (Program lacks support for encryption type)
[2009/12/21 09:08:34, 1] libsmb/clikrb5.c:848(cli_krb5_get_ticket)
cli_krb5_get_ticket: krb5_set_default_tgs_ktypes failed (Program lacks support for encryption type)
[2009/12/21 09:08:34, 0] libads/sasl.c:819(ads_sasl_spnego_bind)
kinit succeeded but ads_sasl_spnego_krb5_bind failed: Program lacks support for encryption type
[2009/12/21 09:08:34, 1] winbindd/winbindd_ads.c:127(ads_cached_connection)
ads_connect for domain [DOMAIN NAME] failed: Program lacks support for encryption type
I hope it helps.
[2009/12/23 11:18:46, 0] libads/sasl.c:819(ads_sasl_spnego_bind)
kinit succeeded but ads_sasl_spnego_krb5_bind failed: Program lacks support for encryption type
Failed to join domain: failed to connect to AD: Program lacks support for encryption type
Here is the relevant section of my smb.conf (output from testparm):
[global]
workgroup = (DELETED)
realm = (DELETED)
security = ADS
password server = (DELETED)
log level = 3
domain master = No
idmap uid = 5000-10000000
idmap gid = 5000-10000000
template shell = /bin/bash
winbind separator = +
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = Yes
smbclient-3.4.3-2-x86_64
samba-3.4.3-2-x86_64
heimdal-1.2.1-7-x86_64
It might also work with samba-3.4.3-3, I didn't check.
Today, for testing purposes, I ran kinit in two different scenarios: #1) with samba installed, #2) after removing the samba package and rebooting.
In both cases, the result was the same:
# kinit administrator@MY.DOMAIN.TLD
administrator@MY.DOMAIN.TLD's Password:
kinit: krb5_get_init_creds: KDC has no support for encryption type
I think this would confirm Alexander's assumption of not samba but heimdal 1.3.1-2 possibly having a problem.
A word of caution, just in case anyone wants to reproduce the above #2: Before rebooting, please make sure to comment out all references to pam_winbind.so in your /etc/pam.d/login, /etc/pam.d/su and /etc/pam.d/sudo files. Else, after rebooting you might no longer be able to log in or become root. Guess who that happened to? ;-)
EDIT: Sorry, it might have just been a wrongly configured /etc/krb5.conf on my machine... Now (still without samba) kinit can get tickets without any error messages. I don't have time this weekend but I am going to reinstall samba in a few days to further troubleshoot.
I was hopeful with the kernel & samba updates, but no luck here either. kinit works, joining domain still fails.
# uname -a
Linux localhost 2.6.32-ARCH #1 SMP PREEMPT Thu Jan 7 22:28:29 CET 2010 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3600+ AuthenticAMD GNU/Linux
# kinit rob@SCHRACK.NET
rob@SCHRACK.NET's Password:
# net ads join -U rob
Enter rob's password:
[2010/01/16 11:17:43, 0] libads/sasl.c:819(ads_sasl_spnego_bind)
kinit succeeded but ads_sasl_spnego_krb5_bind failed: Program lacks support for encryption type
Failed to join domain: failed to connect to AD: Program lacks support for encryption type
# pacman -Q samba
samba 3.4.4-1
# pacman -Q heimdal
heimdal 1.3.1-2
I get this at my bash-console:
kinit: relocation error: /usr/lib/libdes425.so.3: symbol des_IP_table, version k5crypto_3_MIT not defined in file libk5crypto.so.3 with link time reference
The other Command net ads join produce the same error, which was descriped above.
I try to update samba to 3.4.4 with heimdal 1.2.1 but samba doesn't work, it looks for a missing lib (I think PKGBUILD need to be update to dependencies=('heimdal=>1.3-1') ). I try to rebuild samba 3.4.4 from PKGBUILD to link (I want to look if it's samba problem or heimdal) on heimdal 1.2.1 but compilation failed on
Compiling lib/netapi/samr.c
lib/netapi/samr.c: In function ‘libnetapi_samr_open_domain’:
lib/netapi/samr.c:47: error: expected expression before ‘struct’
lib/netapi/samr.c:47: warning: assignment makes pointer from integer without a cast
lib/netapi/samr.c: In function ‘libnetapi_samr_open_builtin_domain’:
lib/netapi/samr.c:169: error: expected expression before ‘struct’
lib/netapi/samr.c:169: warning: assignment makes pointer from integer without a cast
lib/netapi/samr.c: In function ‘libnetapi_samr_close_domain_handle’:
lib/netapi/samr.c:243: error: expected expression before ‘struct’
lib/netapi/samr.c:243: warning: assignment makes pointer from integer without a cast
lib/netapi/samr.c: In function ‘libnetapi_samr_close_builtin_handle’:
lib/netapi/samr.c:267: error: expected expression before ‘struct’
lib/netapi/samr.c:267: warning: assignment makes pointer from integer without a cast
lib/netapi/samr.c: In function ‘libnetapi_samr_close_connect_handle’:
lib/netapi/samr.c:291: error: expected expression before ‘struct’
lib/netapi/samr.c:291: warning: assignment makes pointer from integer without a cast
lib/netapi/samr.c: In function ‘libnetapi_samr_free’:
lib/netapi/samr.c:314: error: expected expression before ‘struct’
lib/netapi/samr.c:314: warning: assignment makes pointer from integer without a cast
The following command failed:
gcc -march=x86-64 -mtune=generic -O2 -pipe -I. -I/var/abs/extra/samba/src/samba-3.4.4/source3 -I/var/abs/extra/samba/src/samba-3.4.4/source3/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -I./../lib/popt -DLDAP_DEPRECATED -I/var/abs/extra/samba/src/samba-3.4.4/source3/lib -I.. -I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -fPIC -c lib/netapi/samr.c -o lib/netapi/samr.o
make: *** [lib/netapi/samr.o] Error 1
# kinit administrateur@AD.LBN.FR
administrateur@AD.LBN.FR's Password:
# klist
Credentials cache: FILE:/tmp/krb5cc_0
Principal: administrateur@AD.LBN.FR
Issued Expires Principal
Jan 19 11:17:26 Jan 19 21:17:20 krbtgt/AD.LBN.FR@AD.LBN.FR
I try samba 3.4.4-1 with heimdal 1.3 samba complayne when start :
/usr/sbin/smbd: error while loading shared libraries: libhx509.so.4: cannot open shared object file: No such file or directory.
I try to fake samba with a symlink from /usr/lib/libhx509.so to /usr/lib/libhx509.so.4. After that samba start but when I try :
#wbinfo -u
Error looking up domain users
See http://www.h5l.org/blog/index.php/2008/10/des-will-die-in-heimdal/ and http://www.h5l.org/blog/index.php/2009/11/heimdal-1-3-0-and-1-3-1/
Same as mit krb has:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566977
what happens is, samba creates a temp
/var/cache/samba/smb_krb5/krb5.conf.NETBIOSDOMAINNAME which includes the DES encryption types. since those are invalid heimdal says: sorry no workey, instead of using the RC4 one also listed in the same temp krb conf.
There is also someone here reporting same issue: http://lists.samba.org/archive/samba/2009-December/152444.html
I htink there are 2 different ways to actually solve this:
1. remove DES from the temp samba file
2. patch heimdal should filter weak enctypes instead of reject on weak enctype (thats what mit and debian did)
I can provide a patch for first option but I'm not sure about second.
I have sent a message upstream to heimdal-discuss:
http://thread.gmane.org/gmane.comp.encryption.kerberos.heimdal.general/5280