Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / pwconv.8
1 '\" t
2 .\"     Title: pwconv
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: System Management Commands
7 .\"    Source: System Management Commands
8 .\"  Language: English
9 .\"
10 .TH "PWCONV" "8" "02/16/2011" "System Management Commands" "System Management 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 pwconv, pwunconv, grpconv, grpunconv \- convert to and from shadow passwords and groups
32 .SH "SYNOPSIS"
33 .HP \w'\fBpwconv\fR\ 'u
34 \fBpwconv\fR
35 .HP \w'\fBpwunconv\fR\ 'u
36 \fBpwunconv\fR
37 .HP \w'\fBgrpconv\fR\ 'u
38 \fBgrpconv\fR
39 .HP \w'\fBgrpunconv\fR\ 'u
40 \fBgrpunconv\fR
41 .SH "DESCRIPTION"
42 .PP
43 The
44 \fBpwconv\fR
45 command creates
46 \fIshadow\fR
47 from
48 \fIpasswd\fR
49 and an optionally existing
50 \fIshadow\fR\&.
51 .PP
52 The
53 \fBpwunconv\fR
54 command creates
55 \fIpasswd\fR
56 from
57 \fIpasswd\fR
58 and
59 \fIshadow\fR
60 and then removes
61 \fIshadow\fR\&.
62 .PP
63 The
64 \fBgrpconv\fR
65 command creates
66 \fIgshadow\fR
67 from
68 \fIgroup\fR
69 and an optionally existing
70 \fIgshadow\fR\&.
71 .PP
72 The
73 \fBgrpunconv\fR
74 command creates
75 \fIgroup\fR
76 from
77 \fIgroup\fR
78 and
79 \fIgshadow\fR
80 and then removes
81 \fIgshadow\fR\&.
82 .PP
83 These four programs all operate on the normal and shadow password and group files:
84 /etc/passwd,
85 /etc/group,
86 /etc/shadow, and
87 /etc/gshadow\&.
88 .PP
89 Each program acquires the necessary locks before conversion\&.
90 \fBpwconv\fR
91 and
92 \fBgrpconv\fR
93 are similar\&. First, entries in the shadowed file which don\*(Aqt exist in the main file are removed\&. Then, shadowed entries which don\*(Aqt have `x\*(Aq as the password in the main file are updated\&. Any missing shadowed entries are added\&. Finally, passwords in the main file are replaced with `x\*(Aq\&. These programs can be used for initial conversion as well to update the shadowed file if the main file is edited by hand\&.
94 .PP
95
96 \fBpwconv\fR
97 will use the values of
98 \fIPASS_MIN_DAYS\fR,
99 \fIPASS_MAX_DAYS\fR, and
100 \fIPASS_WARN_AGE\fR
101 from
102 /etc/login\&.defs
103 when adding new entries to
104 /etc/shadow\&.
105 .PP
106 Likewise
107 \fBpwunconv\fR
108 and
109 \fBgrpunconv\fR
110 are similar\&. Passwords in the main file are updated from the shadowed file\&. Entries which exist in the main file but not in the shadowed file are left alone\&. Finally, the shadowed file is removed\&. Some password aging information is lost by
111 \fBpwunconv\fR\&. It will convert what it can\&.
112 .SH "BUGS"
113 .PP
114 Errors in the password or group files (such as invalid or duplicate entries) may cause these programs to loop forever or fail in other strange ways\&. Please run
115 \fBpwck\fR
116 and
117 \fBgrpck\fR
118 to correct any such errors before converting to or from shadow passwords or groups\&.
119 .SH "CONFIGURATION"
120 .PP
121 The following configuration variable in
122 /etc/login\&.defs
123 changes the behavior of
124 \fBgrpconv\fR
125 and
126 \fBgrpunconv\fR:
127 .PP
128 \fBMAX_MEMBERS_PER_GROUP\fR (number)
129 .RS 4
130 Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
131 /etc/group
132 (with the same name, same password, and same GID)\&.
133 .sp
134 The default value is 0, meaning that there are no limits in the number of members in a group\&.
135 .sp
136 This feature (split group) permits to limit the length of lines in the group file\&. This is useful to make sure that lines for NIS groups are not larger than 1024 characters\&.
137 .sp
138 If you need to enforce such limit, you can use 25\&.
139 .sp
140 Note: split groups may not be supported by all tools (even in the Shadow toolsuite)\&. You should not use this variable unless you really need it\&.
141 .RE
142 .PP
143 The following configuration variables in
144 /etc/login\&.defs
145 change the behavior of
146 \fBpwconv\fR:
147 .PP
148 \fBPASS_MAX_DAYS\fR (number)
149 .RS 4
150 The maximum number of days a password may be used\&. If the password is older than this, a password change will be forced\&. If not specified, \-1 will be assumed (which disables the restriction)\&.
151 .RE
152 .PP
153 \fBPASS_MIN_DAYS\fR (number)
154 .RS 4
155 The minimum number of days allowed between password changes\&. Any password changes attempted sooner than this will be rejected\&. If not specified, \-1 will be assumed (which disables the restriction)\&.
156 .RE
157 .PP
158 \fBPASS_WARN_AGE\fR (number)
159 .RS 4
160 The number of days warning given before a password expires\&. A zero means warning is given only upon the day of expiration, a negative value means no warning is given\&. If not specified, no warning will be provided\&.
161 .RE
162 .SH "FILES"
163 .PP
164 /etc/login\&.defs
165 .RS 4
166 Shadow password suite configuration\&.
167 .RE
168 .SH "SEE ALSO"
169 .PP
170
171 \fBgrpck\fR(8),
172 \fBlogin.defs\fR(5),
173 \fBpwck\fR(8)\&.