Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / chage.1
1 '\" t
2 .\"     Title: chage
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 02/16/2011
6 .\"    Manual: User Commands
7 .\"    Source: User Commands
8 .\"  Language: English
9 .\"
10 .TH "CHAGE" "1" "02/16/2011" "User Commands" "User Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 chage \- change user password expiry information
32 .SH "SYNOPSIS"
33 .HP \w'\fBchage\fR\ 'u
34 \fBchage\fR [\fIoptions\fR] [\fILOGIN\fR]
35 .SH "DESCRIPTION"
36 .PP
37 The
38 \fBchage\fR
39 command changes the number of days between password changes and the date of the last password change\&. This information is used by the system to determine when a user must change his/her password\&.
40 .SH "OPTIONS"
41 .PP
42 The options which apply to the
43 \fBchage\fR
44 command are:
45 .PP
46 \fB\-d\fR, \fB\-\-lastday\fR \fILAST_DAY\fR
47 .RS 4
48 Set the number of days since January 1st, 1970 when the password was last changed\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&.
49 .RE
50 .PP
51 \fB\-E\fR, \fB\-\-expiredate\fR \fIEXPIRE_DATE\fR
52 .RS 4
53 Set the date or number of days since January 1, 1970 on which the user\*(Aqs account will no longer be accessible\&. The date may also be expressed in the format YYYY\-MM\-DD (or the format more commonly used in your area)\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.
54 .sp
55 Passing the number
56 \fI\-1\fR
57 as the
58 \fIEXPIRE_DATE\fR
59 will remove an account expiration date\&.
60 .RE
61 .PP
62 \fB\-h\fR, \fB\-\-help\fR
63 .RS 4
64 Display help message and exit\&.
65 .RE
66 .PP
67 \fB\-I\fR, \fB\-\-inactive\fR \fIINACTIVE\fR
68 .RS 4
69 Set the number of days of inactivity after a password has expired before the account is locked\&. The
70 \fIINACTIVE\fR
71 option is the number of days of inactivity\&. A user whose account is locked must contact the system administrator before being able to use the system again\&.
72 .sp
73 Passing the number
74 \fI\-1\fR
75 as the
76 \fIINACTIVE\fR
77 will remove an account\*(Aqs inactivity\&.
78 .RE
79 .PP
80 \fB\-l\fR, \fB\-\-list\fR
81 .RS 4
82 Show account aging information\&.
83 .RE
84 .PP
85 \fB\-m\fR, \fB\-\-mindays\fR \fIMIN_DAYS\fR
86 .RS 4
87 Set the minimum number of days between password changes to
88 \fIMIN_DAYS\fR\&. A value of zero for this field indicates that the user may change his/her password at any time\&.
89 .RE
90 .PP
91 \fB\-M\fR, \fB\-\-maxdays\fR \fIMAX_DAYS\fR
92 .RS 4
93 Set the maximum number of days during which a password is valid\&. When
94 \fIMAX_DAYS\fR
95 plus
96 \fILAST_DAY\fR
97 is less than the current day, the user will be required to change his/her password before being able to use his/her account\&. This occurrence can be planned for in advance by use of the
98 \fB\-W\fR
99 option, which provides the user with advance warning\&.
100 .sp
101 Passing the number
102 \fI\-1\fR
103 as
104 \fIMAX_DAYS\fR
105 will remove checking a password\*(Aqs validity\&.
106 .RE
107 .PP
108 \fB\-W\fR, \fB\-\-warndays\fR \fIWARN_DAYS\fR
109 .RS 4
110 Set the number of days of warning before a password change is required\&. The
111 \fIWARN_DAYS\fR
112 option is the number of days prior to the password expiring that a user will be warned his/her password is about to expire\&.
113 .RE
114 .PP
115 If none of the options are selected,
116 \fBchage\fR
117 operates in an interactive fashion, prompting the user with the current values for all of the fields\&. Enter the new value to change the field, or leave the line blank to use the current value\&. The current value is displayed between a pair of
118 \fI[ ]\fR
119 marks\&.
120 .SH "NOTE"
121 .PP
122 The
123 \fBchage\fR
124 program requires a shadow password file to be available\&.
125 .PP
126 The
127 \fBchage\fR
128 command is restricted to the root user, except for the
129 \fB\-l\fR
130 option, which may be used by an unprivileged user to determine when his/her password or account is due to expire\&.
131 .SH "FILES"
132 .PP
133 /etc/passwd
134 .RS 4
135 User account information\&.
136 .RE
137 .PP
138 /etc/shadow
139 .RS 4
140 Secure user account information\&.
141 .RE
142 .SH "EXIT VALUES"
143 .PP
144 The
145 \fBchage\fR
146 command exits with the following values:
147 .PP
148 \fI0\fR
149 .RS 4
150 success
151 .RE
152 .PP
153 \fI1\fR
154 .RS 4
155 permission denied
156 .RE
157 .PP
158 \fI2\fR
159 .RS 4
160 invalid command syntax
161 .RE
162 .PP
163 \fI15\fR
164 .RS 4
165 can\*(Aqt find the shadow password file
166 .RE
167 .SH "SEE ALSO"
168 .PP
169
170 \fBpasswd\fR(5),
171 \fBshadow\fR(5)\&.