Kinit programatically??

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

"kul gupta" <kulg123 at> 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

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

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             <>

More information about the krbdev mailing list