1pam_chauthtok(3PAM)          PAM Library Functions         pam_chauthtok(3PAM)
2
3
4

NAME

6       pam_chauthtok  -  perform  password  related  functions  within the PAM
7       framework
8

SYNOPSIS

10       cc [ flag ... ] file ... -lpam [ library ... ]
11       #include <security/pam_appl.h>
12
13       int pam_chauthtok(pam_handle_t *pamh, const int flags);
14
15

DESCRIPTION

17       The pam_chauthtok() function is called  to  change  the  authentication
18       token  associated  with a particular user referenced by the authentica‐
19       tion handle pamh.
20
21
22       The following flag may be passed in to pam_chauthtok():
23
24       PAM_SILENT                    The password service should not  generate
25                                     any messages.
26
27
28       PAM_CHANGE_EXPIRED_AUTHTOK    The  password  service should only update
29                                     those passwords that have aged.  If  this
30                                     flag is not passed, all password services
31                                     should update their passwords.
32
33
34       PAM_NO_AUTHTOK_CHECK          The password service should  not  perform
35                                     conformance   checks   on   the  password
36                                     entered.
37
38
39
40       Upon successful completion of the call, the authentication token of the
41       user will be changed in accordance with the password service configured
42       in the system through pam.conf(4).
43

RETURN VALUES

45       Upon successful completion, PAM_SUCCESS is returned. In addition to the
46       error return values described in pam(3PAM), the following values may be
47       returned:
48
49       PAM_PERM_DENIED              No permission.
50
51
52       PAM_AUTHTOK_ERR              Authentication token manipulation error.
53
54
55       PAM_AUTHTOK_RECOVERY_ERR     Authentication   information   cannot   be
56                                    recovered.
57
58
59       PAM_AUTHTOK_LOCK_BUSY        Authentication token lock busy.
60
61
62       PAM_AUTHTOK_DISABLE_AGING    Authentication token aging disabled.
63
64
65       PAM_USER_UNKNOWN             User unknown to password service.
66
67
68       PAM_TRY_AGAIN                Preliminary   check  by  password  service
69                                    failed.
70
71

ATTRIBUTES

73       See attributes(5) for description of the following attributes:
74
75
76
77
78       ┌─────────────────────────────┬─────────────────────────────┐
79       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
80       ├─────────────────────────────┼─────────────────────────────┤
81       │Interface Stability          │ Stable                      │
82       ├─────────────────────────────┼─────────────────────────────┤
83       │MT-Level                     │MT-Safe with exceptions      │
84       └─────────────────────────────┴─────────────────────────────┘
85

SEE ALSO

87       login(1),      passwd(1),      pam(3PAM),       pam_authenticate(3PAM),
88       pam_start(3PAM), attributes
89

NOTES

91       The flag PAM_CHANGE_EXPIRED_AUTHTOK is typically used by a login appli‐
92       cation which has determined  that  the  user's  password  has  aged  or
93       expired.  Before  allowing the user to login, the login application may
94       invoke pam_chauthtok() with this flag to allow the user to  update  the
95       password. Typically, applications such as passwd(1) should not use this
96       flag.
97
98
99       The pam_chauthtok()  functions  performs  a  preliminary  check  before
100       attempting  to update passwords. This check is performed for each pass‐
101       word module in the stack  as  listed  in  pam.conf(4).  The  check  may
102       include  pinging  remote  name services to determine if they are avail‐
103       able. If pam_chauthtok() returns  PAM_TRY_AGAIN,  then  the  check  has
104       failed, and passwords are not updated.
105
106
107       The  flag PAM_NO_AUTHTOK_CHECK is typically used by programs that allow
108       an administrator to bypass various  password  conformance  checks  when
109       setting a password for a user.
110
111
112       The  interfaces  in  libpam  are MT-Safe only if each thread within the
113       multithreaded application uses its own PAM handle.
114
115
116
117SunOS 5.11                        1 Mar 2005               pam_chauthtok(3PAM)
Impressum