linux - GSSAPI - Windows Active Directory Interoperability - error accepting context: Wrong principal in request -
we writing softwares run on both windows , linux, , plan use windows active directory authentication. struggling issues described below, , appreciate much:
domain name: corp.company.com
test programming running on 1 linux machine: host1.corp.company.com
the test program comes gss-sample krb5-1.11.3 downloaded files.
the server named "gssapitest".
based on "step-by-step guide kerberos 5(krb5 1.0) interoperability(from microsoft) ,
first create user "host1" in ad represent host host1.corp.company.com (the linux machine).
use ktpass generate keytab (run windows): ktpass /princ host/host1.corp.company.com@corp.company.com /mapuser host1 /pass hostpassword /out file1.keytab
now in ad, create domain user "gssapitest" represent test server program, , map user similarly: ktpass /princ gssapitest/host1.corp.company.com@corp.company.com /mapuser gssapitest /pass gssapitestpassword /out file2.keytab
copy file1.keytab , file2.keytab linux machine host1, , merge them /etc/krb5.keytab.
in linux, "ktutil" shows content of /etc/krb5.keytab following:
slot kvno principal 1 4 host/host1.corp.company.com@corp.company.com 2 5 gssapitest/host1.corp.company.com@corp.company.com
on windows, register service (using "setspn") linux server program result looks (2 entries, 1 mapped host name, other actual host name, testing purpose. if 1 entry, no matter one, result same):
registered serviceprincipalnames cn=xxxx,cn=users,dc=corp,dc=company,dc=com: gssapitest/host1:2001 gssapitest/host1.corp.company.com:2001
now start server way:
gss-server -port 2001 gssapitest
and start client terminal way:
gss-client -port 2001 -user xxxx -pass xxxxpassword host1.corp.company.com gssapitest "abcd"
the error shows on server side:
gss-api error accepting context: unspecified gss failure. minor code may provide more information gss-api error accepting context: wrong principal in request
what cause of this? i'd know if step outlined necessary. , 1 not needed @ or incorrect.
(note: have tried log in linux both local user account , domain account in corp.company.com, result shows same error. nslookup shows correct ip host mapping linux machine).
i did test runs, , in case, problem seems this: made changes mapped user, i.e., gssapitest (in "active directory users , computers", unchecked "use des encryption types account" under "account" tab user) after running "ktpass" , merged output file krb5.keytab in linux machine. fix problem, checked "use des encryptiuon types account" again inside active directory, go linux machine, run "kdestroy" before starting server , client programs. worked. if having similar problems, may want possible cause. thanks.
Comments
Post a Comment