'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
.\"  Copyright 1989 AT&T
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH D_PASSWD 4 "Sep 2, 2004"
.SH NAME
d_passwd \- dial-up password file
.SH SYNOPSIS
.LP
.nf
\fB/etc/d_passwd\fR
.fi

.SH DESCRIPTION
.sp
.LP
A dial-up password is an additional password required of users who access the
computer through a modem or dial-up port. The correct password must be entered
before the user is granted access to the computer.
.sp
.LP
\fBd_passwd\fR is an \fBASCII\fR file which contains a list of executable
programs (typically shells) that require a dial-up password and the associated
encrypted passwords. When a user attempts to log in on any of the ports listed
in the \fBdialups\fR file (see \fBdialups\fR(4)), the login program looks at
the user's login entry stored in the \fBpasswd\fR file (see \fBpasswd\fR(4)),
and compares the login shell field to the entries in \fBd_passwd\fR. These
entries determine whether the user will be required to supply a dial-up
password.
.sp
.LP
Each entry in \fBd_passwd\fR is a single line of the form:
.sp
.in +2
.nf
\fIlogin-shell\fR\fB:\fR\fIpassword\fR\fB:\fR
.fi
.in -2
.sp

.sp
.LP
where
.sp
.ne 2
.na
\fB\fIlogin-shell\fR\fR
.ad
.RS 15n
The name of the login program that will require an additional dial-up password.
.RE

.sp
.ne 2
.na
\fB\fIpassword\fR\fR
.ad
.RS 15n
An encrypted password. Users accessing the computer through a  dial-up port or
modem using \fIlogin-shell\fR  will be required to enter this password before
gaining access to the computer.
.RE

.sp
.LP
\fBd_passwd\fR should be owned by the \fBroot\fR user and the \fBroot\fR group.
The file should have read and write permissions for the owner (\fBroot\fR)
only.
.sp
.LP
If the user's login program in the \fBpasswd\fR file is not found in
\fBd_passwd\fR or if the login shell field in \fBpasswd\fR is empty, the user
must supply the default password. The default password is the entry for
\fB/usr/bin/sh\fR. If \fBd_passwd\fR has no entry for \fB/usr/bin/sh\fR, then
those users whose login shell field in \fBpasswd\fR is empty or does not match
any entry in \fBd_passwd\fR will not be prompted for a dial-up password.
.sp
.LP
Dial-up logins are disabled if \fBd_passwd\fR has only the following entry:
.sp
.in +2
.nf
/usr/bin/sh:*:
.fi
.in -2
.sp

.SH EXAMPLES
.LP
\fBExample 1 \fRSample \fBd_passwd\fR file.
.sp
.LP
Here is a sample \fBd_passwd\fR file:

.sp
.in +2
.nf
/usr/lib/uucp/uucico:q.mJzTnu8icF0:
/usr/bin/csh:6k/7KCFRPNVXg:
/usr/bin/ksh:9df/FDf.4jkRt:
/usr/bin/sh:41FuGVzGcDJlw:
.fi
.in -2
.sp

.SS "Generating An Encrypted Password"
.sp
.LP
The \fBpasswd\fR (see \fBpasswd\fR(1)) utility can be used to generate the
encrypted password for each login program. \fBpasswd\fR generates encrypted
passwords for users and places the password in the \fBshadow\fR (see
\fBshadow\fR(4)) file. Passwords for the \fBd_passwd\fR file will need to be
generated by first adding a temporary user id using \fBuseradd\fR (see
\fBuseradd\fR(1M)), and then using \fBpasswd\fR(1) to generate the desired
password in the \fBshadow\fR file. Once the encrypted version of the password
has been created, it can be copied to the \fBd_passwd\fR file.
.sp
.LP
For example:
.RS +4
.TP
1.
Type \fBuseradd\fR \fBtempuser\fR and press Return. This creates a user
named \fBtempuser\fR.
.RE
.RS +4
.TP
2.
Type \fBpasswd\fR \fBtempuser\fR and press Return. This creates an encrypted
password for \fBtempuser\fR and places it in the \fBshadow\fR file.
.RE
.RS +4
.TP
3.
Find the entry for \fBtempuser\fR in the \fBshadow\fR file and copy the
encrypted password to the desired entry in the \fBd_passwd\fR file.
.RE
.RS +4
.TP
4.
Type \fBuserdel\fR \fBtempuser\fR and press Return to delete \fBtempuser\fR.
.RE
.sp
.LP
These steps must be executed as the \fBroot\fR user.
.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/d_passwd\fR\fR
.ad
.RS 17n
dial-up password file
.RE

.sp
.ne 2
.na
\fB\fB/etc/dialups\fR\fR
.ad
.RS 17n
list of dial-up ports requiring dial-up passwords
.RE

.sp
.ne 2
.na
\fB\fB/etc/passwd\fR\fR
.ad
.RS 17n
password file
.RE

.sp
.ne 2
.na
\fB\fB/etc/shadow\fR\fR
.ad
.RS 17n
shadow password file
.RE

.SH SEE ALSO
.sp
.LP
\fBpasswd\fR(1), \fBuseradd\fR(1M), \fBdialups\fR(4), \fBpasswd\fR(4),
\fBshadow\fR(4)
.SH WARNINGS
.sp
.LP
When creating a new dial-up password, be sure to remain logged in on at least
one terminal while testing the new password. This ensures that there is an
available terminal from which you can correct any mistakes that were made when
the new password was added.