]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - crypto/heimdal/lib/krb5/krb5_set_password.3
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / crypto / heimdal / lib / krb5 / krb5_set_password.3
1 .\" Copyright (c) 2003 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\"
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\" $Id: krb5_set_password.3,v 1.3.2.1 2004/06/21 10:51:20 lha Exp $
33 .\"
34 .Dd June  2, 2004
35 .Dt KRB5_SET_PASSWORD 3
36 .Os HEIMDAL
37 .Sh NAME
38 .Nm krb5_change_password ,
39 .Nm krb5_set_password ,
40 .Nm krb5_set_password_using_ccache
41 .Nd change password functions
42 .Sh LIBRARY
43 Kerberos 5 Library (libkrb5, -lkrb5)
44 .Sh SYNOPSIS
45 .In krb5.h
46 .Ft krb5_error_code
47 .Fo krb5_change_password
48 .Fa "krb5_context context"
49 .Fa "krb5_creds *creds"
50 .Fa "char *newpw"
51 .Fa "int *result_code"
52 .Fa "krb5_data *result_code_string"
53 .Fa "krb5_data *result_string"
54 .Fc
55 .Ft krb5_error_code
56 .Fo krb5_set_password
57 .Fa "krb5_context context"
58 .Fa "krb5_creds *creds"
59 .Fa "char *newpw"
60 .Fa "krb5_principal targprinc",
61 .Fa "int *result_code"
62 .Fa "krb5_data *result_code_string"
63 .Fa "krb5_data *result_string"
64 .Fc
65 .Ft krb5_error_code
66 .Fo krb5_set_password_using_ccache
67 .Fa "krb5_context context"
68 .Fa "krb5_ccache ccache"
69 .Fa "char *newpw"
70 .Fa "krb5_principal targprinc"
71 .Fa "int *result_code"
72 .Fa "krb5_data *result_code_string"
73 .Fa "krb5_data *result_string"
74 .Fc
75 .Sh DESCRIPTION
76 These functions change the password for a given principal.
77 .Pp
78 .Fn krb5_set_password
79 and
80 .Fa krb5_set_password_using_ccache
81 is the newer two of the three functions and uses a newer version of the
82 protocol (and falls back to the older when the newer doesn't work).
83 .Pp
84 .Fn krb5_change_password
85 set the password
86 .Fa newpasswd
87 for the client principal in
88 .Fa creds .
89 The server principal of creds must be
90 .Li kadmin/changepw .
91 .Pp
92 .Fn krb5_set_password
93 changes the password for the principal
94 .Fa targprinc ,
95 if
96 .Fa targprinc
97 is
98 .Dv NULL
99 the default principal in
100 .Fa ccache
101 is used.
102 .Pp
103 Both functions returns and error in
104 .Fa result_code
105 and maybe an error strings to print in
106 .Fa result_string .
107 .Sh SEE ALSO
108 .Xr krb5_ccache 3 ,
109 .Xr krb5_init_context 3