1 .\" Copyright (c) 2001 Kungliga Tekniska Högskolan
2 .\" $Id: krb5_verify_user.3,v 1.5 2002/08/28 15:30:58 joda Exp $
8 .Nm krb5_verify_user_lrealm
9 .Nd Heimdal password verifying functions
11 Kerberos 5 Library (libkrb5, -lkrb5)
15 .Fn "krb5_verify_user" "krb5_context context" " krb5_principal principal" "krb5_ccache ccache" "const char *password" "krb5_boolean secure" "const char *service"
17 .Fn "krb5_verify_user_lrealm" "krb5_context context" "krb5_principal principal" "krb5_ccache ccache" "const char *password" "krb5_boolean secure" "const char *service"
21 function verifies the password supplied by a user.
23 password will be verified is specified in
25 New tickets will be obtained as a side-effect and stored in
27 (if NULL, the default ccache is used).
28 If the password is not supplied in
32 the user will be prompted for it.
35 the ticket will be verified against the locally stored service key
44 .Nm krb5_verify_user_lrealm
45 function does the same, except that it ignores the realm in
47 and tries all the local realms (see
49 After a successful return, the principal is set to the authenticated
50 realm. If the call fails, the principal will not be meaningful, and
51 should only be freed with
52 .Xr krb5_free_principal 3 .
54 Here is a example program that verifies a password. it uses the
62 main(int argc, char **argv)
65 krb5_error_code error;
70 errx(1, "usage: verify_passwd <principal-name>");
74 if (krb5_init_context(&context) < 0)
75 errx(1, "krb5_init_context");
77 if ((error = krb5_parse_name(context, user, &princ)) != 0)
78 krb5_err(context, 1, error, "krb5_parse_name");
80 error = krb5_verify_user(context, princ, NULL, NULL, TRUE, NULL);
82 krb5_err(context, 1, error, "krb5_verify_user");
89 .Xr krb5_free_principal 3 ,
90 .Xr krb5_init_context 3 ,
91 .Xr krb5_kt_default 3 ,