freebsd-dev/usr.bin/passwd/yppasswd.1
Bill Paul 9e32e2330f Obtained from: The NYS project
This is the first round of changes to incorporate YP server functionality
into FreeBSD. This particular change allows passwd to change either the
local or NIS password, as well as the NIS GECOS and shell information.

Essentially, I've taken passwd(1) and yppasswd from the yppasswd-0.5
distribution (which is part of the NYS project -- a project to provide
a GNU GPL'ed suite of NIS tools) and rammed them into each other
at high speed. I've tried my best to make this co-exist with the
Kerberos stuff, but since I don't run Kerberos I don't have an easy
way to verify that it all works. If you choose any Kerberos flags
then the YP checks should be bypassed, but that may not be enough.
I'll modify it some more if it turns out I broke something. For now,
support for localand NIS passwords is pretty solid:

- If you simply type 'passwd,' the program checks to see if you exist
  in the local pwd.db database. If not, you get bounced to YP.

- If you try to force local functionality with the -l flag and you
  don't exist locally, you get an error.

The -y flag can be used to force YP functionality. -f and -s let you
change your full name and shell (respectively). -f *and* -s let you
change all of your 'account information.'

ypchfn, ypchsh, yppasswd and ypchpass are all links to passwd.
1995-01-31 08:34:16 +00:00

129 lines
4.1 KiB
Groff

.\"
.\" Manpage Copyright 1994 Olaf Kirch, <okir@monad.swb.de>
.\"
.TH YPPASSWD 1 "18 December 1994" "" ""
.SH NAME
yppasswd, ypchfn, ypchsh \- NIS password update clients
.SH SYNOPSIS
.B "yppasswd [-l] [-f] [-p] [user]"
.br
.B "ypchfn [-l] [-f] [-p] [user]"
.br
.B "ypchsh [-l] [-f] [-p] [user]"
.SH DESCRIPTION
When distributing your users' passwords over NIS (a.k.a. YP), the standard
\fBpasswd\fP, \fBchfn\fP and \fBchsh\fP utilities cannot be used anymore to
let a user change her password, because they only modify the password file
on the local host. They are usually replaced by their YP counterparts,
\fByppasswd\fP, \fBypchfn\fP and \fBypchsh\fP.
.P
These commands are in fact the very same program, linked to different names.
Using the command line switches, you can choose whether to update your
password (\fB-p\fP), your login shell (\fB-l\fP), or your GECOS field
information (\fB-f\fP), or a combination of them. \fByppasswd\fP implies
the \fB-p\fP option, \fBypchfn\fP the \fB-f\fP option, and so on.
.P
When invoked without the \fIuser\fP argument, the account information for
the invoking user will be updated, otherwise that of \fIuser\fP will be
updated. This option is only available to the superuser.
.P
All tools will first prompt the user for the current NIS password needed
for authentication with the \fByppasswdd\fP daemon. Subsequently, the
program prompts for the updated information:
.\"
.\"
.IP "\fByppasswd\fP or \fB-p\fP
Change the user's NIS password. The user is prompted for the new password.
While typing the password, echoing is turned off, so the password does not
appear on the screen. An empty password is rejected, as are passwords shorter
than six characters. The user will then be requested to retype the
password to make sure it wasn't misspelled the first time.
.\"
.\"
.IP "\fBypchsh\fP or \fB-l\fP
Change the user's login shell. The user is prompted for a new shell,
offering the old one as default:
.IP
.in +2n
.ft B
.nf
Login shell [/bin/bash]: _
.fi
.ft
.in
.IP
To accept the default, simply press return. To clear the shell field in
your \fBpasswd\fP file entry (so that the system's default shell is selected),
enter the string \fInone\fP.
.\"
.\"
.IP "\fBypchfn\fP or \fB-f\fP
Change the user's full name and related information. Traditionally, some
applications expect the GECOS field (field 4) of the \fBpasswd\fP file to
contain the user's real name (as opposed to the login name) plus some
additional information like the office phone number. This information is
displayed by \fBfinger(1)\fP and probably some other tools, too.
.IP
When setting the full name, \fBypchfn\fP displays the following prompts,
with the defaults in brackets:
.IP
.in +2n
.ft B
.nf
Name [Joe Doe]:
Location [2nd floor, bldg 34]:
Office Phone [12345]:
Home Phone []:
.fi
.ft
.in
.IP
To accept a default, simply press return. To clear a field, enter the string
\fInone\fP.
.SH INSTALLATION
\fByppasswd\fP and friends are usually installed over the existing, non-NIS
versions of these programs by renaming the old programs, and linking the new
ones to the `normal' names. In this way, users can continue to use
\fBpasswd\fP without having to meditate on the nature of NIS. For instance,
\fByppasswd\fP could be substituted for \fBpasswd\fP with the following
sequence of commands:
.P
.in +2n
.ft B
.nf
# cd /bin
# mv passwd passwd.old
# chmod go-rwx passwd.old
# ln yppasswd passwd
.fi
.ft R
.in
.P
In this way, the superuser can still use \fBpasswd.old\fP to update the
local passwords of users not in the NIS \fBpasswd.*\fP maps. Usually, the
user information for critical accounts such as \fBroot\fP are kept
in the local \fBpasswd\fP file.
.SH LICENSE
This program is a heavily beefed-up version of Theo de Raadt's \fByppasswd\fP
client, which is covered by the BSD license. Therefore, the BSD license
applies to this program as well.
.SH FILES
\fB/bin/yppasswd\fP
.br
\fB/bin/passwd\fP
.br
\fB/bin/ypchfn\fP
.br
\fB/bin/ypchsh\fP
.SH SEE ALSO
.BR finger(1) ,
.BR passwd(5) ,
.BR passwd(1) ,
.BR ypchfn(1) ,
.BR ypchsh(1) ,
.BR yppasswdd(8) .
.SH AUTHOR
Theo de Raadt <deraadt@fsa.ca> (original client)
.br
Olaf Kirch <okir@monad.swb.de> (heavy modifications and manpages)