xref: /minix3/usr.bin/chpass/chpass.1 (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1*84d9c625SLionel Sambuc.\"	$NetBSD: chpass.1,v 1.25 2012/04/21 12:27:29 roy Exp $
25c007436SBen Gras.\"
35c007436SBen Gras.\" Copyright (c) 1988, 1990, 1993
45c007436SBen Gras.\"	The Regents of the University of California.  All rights reserved.
55c007436SBen Gras.\"
65c007436SBen Gras.\" Redistribution and use in source and binary forms, with or without
75c007436SBen Gras.\" modification, are permitted provided that the following conditions
85c007436SBen Gras.\" are met:
95c007436SBen Gras.\" 1. Redistributions of source code must retain the above copyright
105c007436SBen Gras.\"    notice, this list of conditions and the following disclaimer.
115c007436SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
125c007436SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
135c007436SBen Gras.\"    documentation and/or other materials provided with the distribution.
145c007436SBen Gras.\" 3. Neither the name of the University nor the names of its contributors
155c007436SBen Gras.\"    may be used to endorse or promote products derived from this software
165c007436SBen Gras.\"    without specific prior written permission.
175c007436SBen Gras.\"
185c007436SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
195c007436SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
205c007436SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
215c007436SBen Gras.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
225c007436SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
235c007436SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
245c007436SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
255c007436SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
265c007436SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
275c007436SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
285c007436SBen Gras.\" SUCH DAMAGE.
295c007436SBen Gras.\"
305c007436SBen Gras.\"     @(#)chpass.1	8.2 (Berkeley) 12/30/93
315c007436SBen Gras.\"
32*84d9c625SLionel Sambuc.Dd April 5, 2012
335c007436SBen Gras.Dt CHPASS 1
345c007436SBen Gras.Os
355c007436SBen Gras.Sh NAME
365c007436SBen Gras.Nm chpass ,
375c007436SBen Gras.Nm chfn ,
385c007436SBen Gras.Nm chsh
395c007436SBen Gras.Nd add or change user database information
405c007436SBen Gras.Sh SYNOPSIS
415c007436SBen Gras.Nm
425c007436SBen Gras.Op Fl a Ar list
435c007436SBen Gras.Op Fl s Ar newshell
445c007436SBen Gras.Op Fl l
455c007436SBen Gras.Op user
465c007436SBen Gras.Nm chpass
475c007436SBen Gras.Op Fl a Ar list
485c007436SBen Gras.Op Fl s Ar newshell
495c007436SBen Gras.Op Fl y
505c007436SBen Gras.Op user
515c007436SBen Gras.Sh DESCRIPTION
525c007436SBen Gras.Nm
535c007436SBen Grasallows editing of the user database information associated
545c007436SBen Graswith
555c007436SBen Gras.Ar user
565c007436SBen Grasor, by default, the current user.
575c007436SBen GrasThe information is formatted and supplied to an editor for changes.
585c007436SBen Gras.Pp
595c007436SBen GrasOnly the information that the user is allowed to change is displayed.
605c007436SBen Gras.Pp
615c007436SBen GrasThe options are as follows:
625c007436SBen Gras.Bl -tag -width Ds
635c007436SBen Gras.It Fl a
645c007436SBen GrasThe super-user is allowed to directly supply a user database
655c007436SBen Grasentry, in the format specified by
665c007436SBen Gras.Xr passwd 5 ,
675c007436SBen Grasas an argument.
685c007436SBen GrasThis argument must be a colon
695c007436SBen Gras.Pq Dq \&:
705c007436SBen Grasseparated list of all the
715c007436SBen Grasuser database fields, although they may be empty.
725c007436SBen Gras.It Fl s
735c007436SBen GrasThe
745c007436SBen Gras.Fl s
755c007436SBen Grasoption attempts to change the user's shell to
765c007436SBen Gras.Ar newshell .
775c007436SBen Gras.It Fl l
785c007436SBen GrasThis option causes the password to be updated only in the local
795c007436SBen Graspassword file.
805c007436SBen GrasWhen changing only the local password,
815c007436SBen Gras.Xr pwd_mkdb 8
825c007436SBen Grasis used to update the password databases.
835c007436SBen Gras.It Fl y
845c007436SBen GrasThis forces the YP password database entry to be changed, even if
855c007436SBen Grasthe user has an entry in the local database.
865c007436SBen GrasThe
875c007436SBen Gras.Xr rpc.yppasswdd 8
885c007436SBen Grasdaemon should be running on the YP master server.
895c007436SBen Gras.El
905c007436SBen Gras.Pp
915c007436SBen GrasPossible display items are as follows:
925c007436SBen Gras.Pp
935c007436SBen Gras.Bl -tag -width "Home Directory:" -compact -offset indent
945c007436SBen Gras.It Login :
955c007436SBen Grasuser's login name
965c007436SBen Gras.It Password :
975c007436SBen Grasuser's encrypted password
985c007436SBen Gras.It Uid :
995c007436SBen Grasuser's login
1005c007436SBen Gras.It Gid :
1015c007436SBen Grasuser's login group
1025c007436SBen Gras.It Change :
1035c007436SBen Graspassword change time
1045c007436SBen Gras.It Expire :
1055c007436SBen Grasaccount expiration time
1065c007436SBen Gras.It Class :
1075c007436SBen Grasuser's general classification
1085c007436SBen Gras.It Home Directory :
1095c007436SBen Grasuser's home directory
1105c007436SBen Gras.It Shell :
1115c007436SBen Grasuser's login shell
1125c007436SBen Gras.It Full Name :
1135c007436SBen Grasuser's real name
1145c007436SBen Gras.It Location :
1155c007436SBen Grasuser's normal location
1165c007436SBen Gras.It Home Phone :
1175c007436SBen Grasuser's home phone
1185c007436SBen Gras.It Office Phone :
1195c007436SBen Grasuser's office phone
1205c007436SBen Gras.El
1215c007436SBen Gras.Pp
1225c007436SBen GrasThe
1235c007436SBen Gras.Ar login
1245c007436SBen Grasfield is the user name used to access the computer account.
1255c007436SBen Gras.Pp
1265c007436SBen GrasThe
1275c007436SBen Gras.Ar password
1285c007436SBen Grasfield contains the encrypted form of the user's password.
1295c007436SBen Gras.Pp
1305c007436SBen GrasThe
1315c007436SBen Gras.Ar uid
1325c007436SBen Grasfield is the number associated with the
1335c007436SBen Gras.Ar login
1345c007436SBen Grasfield.
1355c007436SBen GrasBoth of these fields should be unique across the system (and often
1365c007436SBen Grasacross a group of systems) as they control file access.
1375c007436SBen Gras.Pp
1385c007436SBen GrasWhile it is possible to have multiple entries with identical login names
1395c007436SBen Grasand/or identical user id's, it is usually a mistake to do so.
1405c007436SBen GrasRoutines
1415c007436SBen Grasthat manipulate these files will often return only one of the multiple
1425c007436SBen Grasentries, and that one by random selection.
1435c007436SBen Gras.Pp
1445c007436SBen GrasThe
1455c007436SBen Gras.Ar group
1465c007436SBen Grasfield is the group that the user will be placed in at login.
1475c007436SBen GrasSince
1485c007436SBen Gras.Bx
1495c007436SBen Grassupports multiple groups (see
1505c007436SBen Gras.Xr groups 1 )
1515c007436SBen Grasthis field currently has little special meaning.
1525c007436SBen GrasThis field may be filled in with either a number or a group name (see
1535c007436SBen Gras.Xr group 5 ) .
1545c007436SBen Gras.Pp
1555c007436SBen GrasThe
1565c007436SBen Gras.Ar change
1575c007436SBen Grasfield is the date by which the password must be changed.
1585c007436SBen Gras.Pp
1595c007436SBen GrasThe
1605c007436SBen Gras.Ar expire
1615c007436SBen Grasfield is the date on which the account expires.
1625c007436SBen Gras.Pp
1635c007436SBen GrasBoth the
1645c007436SBen Gras.Ar change
1655c007436SBen Grasand
1665c007436SBen Gras.Ar expire
1675c007436SBen Grasfields should be entered in the form
1685c007436SBen Gras.Dq month day year
1695c007436SBen Graswhere
1705c007436SBen Gras.Ar month
1715c007436SBen Grasis the month name (the first three characters are sufficient),
1725c007436SBen Gras.Ar day
1735c007436SBen Grasis the day of the month, and
1745c007436SBen Gras.Ar year
1755c007436SBen Grasis the year.
1765c007436SBen Gras.Pp
1775c007436SBen GrasThe
1785c007436SBen Gras.Ar class
1795c007436SBen Grasfield is a key for a user's login class.
1805c007436SBen GrasLogin classes are defined in
1815c007436SBen Gras.Xr login.conf 5 ,
1825c007436SBen Graswhich is a
183*84d9c625SLionel Sambuc.Xr capfile 5
1845c007436SBen Grasstyle database of user attributes, accounting, resource and
1855c007436SBen Grasenvironment settings.
1865c007436SBen Gras.Pp
1875c007436SBen GrasThe user's
1885c007436SBen Gras.Ar home directory
1895c007436SBen Grasis the full
1905c007436SBen Gras.Ux
1915c007436SBen Graspath name where the user will be placed at login.
1925c007436SBen Gras.Pp
1935c007436SBen GrasThe
1945c007436SBen Gras.Ar shell
1955c007436SBen Grasfield is the command interpreter the user prefers.
1965c007436SBen GrasIf the
1975c007436SBen Gras.Ar shell
1985c007436SBen Grasfield is empty, the Bourne shell,
1995c007436SBen Gras.Pa /bin/sh ,
2005c007436SBen Grasis assumed.
2015c007436SBen GrasWhen altering a login shell, and not the super-user, the user
2025c007436SBen Grasmay not change from a non-standard shell or to a non-standard
2035c007436SBen Grasshell.
2045c007436SBen GrasNon-standard is defined as a shell not found in
2055c007436SBen Gras.Pa /etc/shells .
2065c007436SBen Gras.Pp
2075c007436SBen GrasThe last four fields are for storing the user's
2085c007436SBen Gras.Ar full name , office location ,
2095c007436SBen Grasand
2105c007436SBen Gras.Ar home
2115c007436SBen Grasand
2125c007436SBen Gras.Ar work telephone
2135c007436SBen Grasnumbers.
2145c007436SBen Gras.Pp
2155c007436SBen GrasOnce the information has been verified,
2165c007436SBen Gras.Nm
2175c007436SBen Grasuses
2185c007436SBen Gras.Xr pwd_mkdb 8
2195c007436SBen Grasto update the user database.
2205c007436SBen Gras.Sh ENVIRONMENT
2215c007436SBen GrasThe
2225c007436SBen Gras.Xr vi 1
2235c007436SBen Graseditor will be used unless the environment variable
2245c007436SBen Gras.Ev EDITOR
2255c007436SBen Grasis set to an alternative editor.
2265c007436SBen GrasWhen the editor terminates, the information is re-read and used to
2275c007436SBen Grasupdate the user database itself.
2285c007436SBen GrasOnly the user, or the super-user, may edit the information associated
2295c007436SBen Graswith the user.
2305c007436SBen Gras.Sh FILES
2315c007436SBen Gras.Bl -tag -width /etc/master.passwd -compact
2325c007436SBen Gras.It Pa /etc/master.passwd
2335c007436SBen GrasThe user database
2345c007436SBen Gras.It Pa /etc/passwd
2355c007436SBen GrasA Version 7 format password file
2365c007436SBen Gras.It Pa /etc/ptmp
2375c007436SBen GrasLock file for the passwd database
2385c007436SBen Gras.It Pa /tmp/pw.XXXXXX
2395c007436SBen GrasTemporary copy of the user passwd information
2405c007436SBen Gras.It Pa /etc/shells
2415c007436SBen GrasThe list of approved shells
2425c007436SBen Gras.El
2435c007436SBen Gras.Sh SEE ALSO
2445c007436SBen Gras.Xr finger 1 ,
2455c007436SBen Gras.Xr login 1 ,
2465c007436SBen Gras.Xr passwd 1 ,
2475c007436SBen Gras.Xr pwhash 1 ,
2485c007436SBen Gras.Xr getusershell 3 ,
2495c007436SBen Gras.Xr passwd 5 ,
2505c007436SBen Gras.Xr passwd.conf 5 ,
2515c007436SBen Gras.Xr pwd_mkdb 8 ,
2525c007436SBen Gras.Xr vipw 8
2535c007436SBen Gras.Rs
2545c007436SBen Gras.%A Robert Morris
2555c007436SBen Gras.%A Ken Thompson
2565c007436SBen Gras.%T "UNIX Password Security"
2575c007436SBen Gras.Re
2585c007436SBen Gras.Sh HISTORY
2595c007436SBen GrasThe
2605c007436SBen Gras.Nm
2615c007436SBen Grascommand appeared in
2625c007436SBen Gras.Bx 4.3 Reno .
2635c007436SBen Gras.Sh BUGS
2645c007436SBen GrasThis program's interface is poorly suited to cryptographic systems such as
2655c007436SBen GrasKerberos, and consequently Kerberos password changing is not a feature of
2665c007436SBen Grasthis program.
2675c007436SBen Gras.Pp
2685c007436SBen GrasUser information should (and eventually will) be stored elsewhere.
269