You need to download MIT Kerberos. The Kerberos that comes with Solaris does not expose the APIs you want. The function you need is krb5_get_init_creds_password. The documentation is spotty; feel free to ask on kerberos at mit.edu for help.