Kinit programatically??

Russ Allbery rra at stanford.edu
Mon Jun 23 12:14:34 EDT 2008


"kul gupta" <kulg123 at gmail.com> writes:

> hello
> Thanks
> I m using MIT kerberose.
> I will appreciate if someone can help me how to proceed to ahieve the
> "Kinit" programatically.
>
>
> The user has entered -username and password through stdin.
> How can i get the TGT programatically?(using GSS-API) so as to proceed
> further .??

You cannot get a TGT using GSSAPI.  GSSAPI has no facility for initial
authentication.

For an example of many different types of authentication using the native
Kerberos API, take a look at:

    http://www.eyrie.org/~eagle/software/kstart/

If you already have the password in hand, you probably want the
krb5_get_init_creds_password function, but there's some setup that you
have to do first and you probably want to store the credentials in a
ticket cache afterwards.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the Kerberos mailing list