[27336] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Kerberos environment under windows

daemon@ATHENA.MIT.EDU (Christopher D. Clausen)
Thu Feb 1 09:55:23 2007

Message-ID: <019801c74610$f3dd5be0$0100a8c0@CDCHOME>
From: "Christopher D. Clausen" <cclausen@acm.org>
To: "Peger, Daniel Heinrich" <dpeger@cosa.de>
Date: Thu, 1 Feb 2007 08:49:28 -0600
Cc: kerberos@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

I don't know to do this from C code, but I generally kinit -kt 
\path\to\keytab principal/instace@realm and then run the app as needed. 
No need to additionaly code in keytab support into the app.

<<CDC

Peger, Daniel Heinrich <dpeger@cosa.de> wrote:
> Hi,
>
> actually I'm trying to write a C app (similar to the sample gss-client
> and gss-server) that should use the test realm instead of the real
> Windows Domain based realm. Where do I have to put the krb5.ini? I
> copied it to %SystemRoot% but it doesn't seem to be recognized...
>
> Hitherto my code looks like:
>
>     srv_name = "test-service@myhost";
>
>     srv_name_buff.value = srv_name;
>     srv_name_buff.length = strlen(srv_name);
>
>     maj_stat = gss_import_name(&min_stat, &srv_name_buff,
>         (gss_OID) gss_nt_service_name,
>         &srv_gss_name);
>
>     maj_stat = gss_display_name(&min_stat, srv_gss_name,
> &srv_name_buff,
>               (gss_OID *) NULL);
>
>     printf("srv_name = %s\n", (char*) srv_name_buff.value);
>
> And the output of this snippet is:
>
>     srv_name = test-service/myhost@MY.WINDOWS.DOMAIN.REALM
>
> But in %SystemRoot%\krb5.ini I set the default realm to
> MY.KRBTEST.REALM...
>
> Additionally I need a way to specify the keytab file used to lookup
> the
> pass for test-service. Is there another way than specifying
> default_keytab_file in the krb5.ini? And how do I tell my programm to
> use the keytab to acquire the service credentials? 


________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post