xref: /freebsd/crypto/heimdal/lib/krb5/krb5_set_password.3 (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
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
43Kerberos 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
76These functions change the password for a given principal.
77.Pp
78.Fn krb5_set_password
79and
80.Fa krb5_set_password_using_ccache
81is the newer two of the three functions and uses a newer version of the
82protocol (and falls back to the older when the newer doesn't work).
83.Pp
84.Fn krb5_change_password
85set the password
86.Fa newpasswd
87for the client principal in
88.Fa creds .
89The server principal of creds must be
90.Li kadmin/changepw .
91.Pp
92.Fn krb5_set_password
93changes the password for the principal
94.Fa targprinc ,
95if
96.Fa targprinc
97is
98.Dv NULL
99the default principal in
100.Fa ccache
101is used.
102.Pp
103Both functions returns and error in
104.Fa result_code
105and 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
110