shadow/man/pwconv.8

99 lines
2.6 KiB
Groff

.\" ** You probably do not want to edit this file directly **
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.0).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
.TH "PWCONV" "8" "26 Sep 1997" "26 Sep 1997" "26 Sep 1997"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
pwconv, pwunconv, grpconv, grpunconv \- convert to and from shadow passwords and groups.
.SH "SYNOPSIS"
.HP 7
\fBpwconv\fR
.HP 9
\fBpwunconv\fR
.HP 8
\fBgrpconv\fR
.HP 10
\fBgrpunconv\fR
.SH "DESCRIPTION"
.PP
\fBpwconv\fR
creates
\fIshadow\fR
from
\fIpasswd\fR
and an optionally existing
\fIshadow\fR.
.PP
\fBpwunconv\fR
creates
\fIpasswd\fR
from
\fIpasswd\fR
and
\fIshadow\fR
and then removes
\fIshadow\fR.
.PP
\fBgrpconv\fR
creates
\fIgshadow\fR
from
\fIgroup\fR
and an optionally existing
\fIgshadow\fR.
.PP
\fBgrpunconv\fR
creates
\fIgroup\fR
from
\fIgroup\fR
and
\fIgshadow\fR
and then removes
\fIgshadow\fR.
.PP
These four programs all operate on the normal and shadow password and group files:
\fI/etc/passwd\fR,
\fI/etc/group\fR,
\fI/etc/shadow\fR, and
\fI/etc/gshadow\fR.
.PP
Each program acquires the necessary locks before conversion.
\fBpwconv\fR
and
\fBgrpconv\fR
are similar. First, entries in the shadowed file which don't exist in the main file are removed. Then, shadowed entries which don't have `x' 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'. These programs can be used for initial conversion as well to update the shadowed file if the main file is edited by hand.
.PP
\fBpwconv\fR
will use the values of
\fIPASS_MIN_DAYS\fR,
\fIPASS_MAX_DAYS\fR, and
\fIPASS_WARN_AGE\fR
from
\fI/etc/login.defs\fR
when adding new entries to
\fI/etc/shadow\fR.
.PP
Likewise
\fBpwunconv\fR
and
\fBgrpunconv\fR
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
\fBpwunconv\fR. It will convert what it can.
.SH "BUGS"
.PP
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
\fBpwck\fR
and
\fBgrpck\fR
to correct any such errors before converting to or from shadow passwords or groups.
.SH "SEE ALSO"
.PP
\fBlogin.defs\fR(5),
\fBgrpck\fR(8),
\fBpwck\fR(8)