xref: /freebsd-src/usr.bin/chpass/chpass.1 (revision bdcbfde31e8e9b343f113a1956384bdf30d1ed62)
19b50d902SRodney W. Grimes.\" Copyright (c) 1988, 1990, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
139b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
149b50d902SRodney W. Grimes.\"    without specific prior written permission.
159b50d902SRodney W. Grimes.\"
169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269b50d902SRodney W. Grimes.\" SUCH DAMAGE.
279b50d902SRodney W. Grimes.\"
28*17054abfSCeri Davies.Dd May 25, 2021
299b50d902SRodney W. Grimes.Dt CHPASS 1
309b50d902SRodney W. Grimes.Os
319b50d902SRodney W. Grimes.Sh NAME
326414fabfSAlexey Zelkin.Nm chpass ,
336414fabfSAlexey Zelkin.Nm chfn ,
346414fabfSAlexey Zelkin.Nm chsh ,
356414fabfSAlexey Zelkin.Nm ypchpass ,
366414fabfSAlexey Zelkin.Nm ypchfn ,
376414fabfSAlexey Zelkin.Nm ypchsh
389b50d902SRodney W. Grimes.Nd add or change user database information
399b50d902SRodney W. Grimes.Sh SYNOPSIS
40c2364e5aSMateusz Piotrowski.Nm chpass
41c2364e5aSMateusz Piotrowski.Op Fl a Ar list
42c2364e5aSMateusz Piotrowski.Op Fl e Ar expiretime
43c2364e5aSMateusz Piotrowski.Op Fl p Ar encpass
44c2364e5aSMateusz Piotrowski.Op Fl s Ar newshell
45c2364e5aSMateusz Piotrowski.Op user
46c2364e5aSMateusz Piotrowski.Nm ypchpass
47c8f6f8e4SMateusz Piotrowski.Op Fl loy
489b50d902SRodney W. Grimes.Op Fl a Ar list
492e15fcdfSAlexey Zelkin.Op Fl d Ar domain
50c8f6f8e4SMateusz Piotrowski.Op Fl e Ar expiretime
512e15fcdfSAlexey Zelkin.Op Fl h Ar host
52c8f6f8e4SMateusz Piotrowski.Op Fl p Ar encpass
53c8f6f8e4SMateusz Piotrowski.Op Fl s Ar newshell
542e15fcdfSAlexey Zelkin.Op user
559b50d902SRodney W. Grimes.Sh DESCRIPTION
560e10ef2eSGarrett WollmanThe
576414fabfSAlexey Zelkin.Nm
58014f5fe7SRuslan Ermilovutility
599b50d902SRodney W. Grimesallows editing of the user database information associated
609b50d902SRodney W. Grimeswith
619b50d902SRodney W. Grimes.Ar user
629b50d902SRodney W. Grimesor, by default, the current user.
639e655d62STom Rhodes.Pp
649e655d62STom RhodesThe
65facc6767SRuslan Ermilov.Nm chfn ,
66facc6767SRuslan Ermilov.Nm chsh ,
67facc6767SRuslan Ermilov.Nm ypchpass ,
68facc6767SRuslan Ermilov.Nm ypchfn
699e655d62STom Rhodesand
70facc6767SRuslan Ermilov.Nm ypchsh
71014f5fe7SRuslan Ermilovutilities behave identically to
729e655d62STom Rhodes.Nm .
73014f5fe7SRuslan Ermilov(There is only one program.)
749e655d62STom Rhodes.Pp
759b50d902SRodney W. GrimesThe information is formatted and supplied to an editor for changes.
769b50d902SRodney W. Grimes.Pp
779b50d902SRodney W. GrimesOnly the information that the user is allowed to change is displayed.
789b50d902SRodney W. Grimes.Pp
799b50d902SRodney W. GrimesThe options are as follows:
80303869edSMateusz Piotrowski.Bl -tag -width "-e expiretime"
81303869edSMateusz Piotrowski.It Fl a Ar list
829b50d902SRodney W. GrimesThe super-user is allowed to directly supply a user database
839b50d902SRodney W. Grimesentry, in the format specified by
849b50d902SRodney W. Grimes.Xr passwd 5 ,
859b50d902SRodney W. Grimesas an argument.
86e1e5fdf6SAlexey ZelkinThis argument must be a colon
879b88faecSRuslan Ermilov.Pq Dq \&:
88e1e5fdf6SAlexey Zelkinseparated list of all the
899b50d902SRodney W. Grimesuser database fields, although they may be empty.
902e15fcdfSAlexey Zelkin.It Fl e Ar expiretime
9187faa07bSSheldon HearnChange the account expire time.
9287faa07bSSheldon HearnThis option is used to set the expire time
932e15fcdfSAlexey Zelkinfrom a script as if it was done in the interactive editor.
94303869edSMateusz Piotrowski.It Fl p Ar encpass
95303869edSMateusz PiotrowskiThe super-user is allowed to directly supply an encrypted password field,
96303869edSMateusz Piotrowskiin the format used by
97303869edSMateusz Piotrowski.Xr crypt 3 ,
98303869edSMateusz Piotrowskias an argument.
996414fabfSAlexey Zelkin.It Fl s Ar newshell
1006414fabfSAlexey ZelkinAttempt to change the user's shell to
1019b50d902SRodney W. Grimes.Ar newshell .
1029b50d902SRodney W. Grimes.El
1039b50d902SRodney W. Grimes.Pp
1049b50d902SRodney W. GrimesPossible display items are as follows:
1059b50d902SRodney W. Grimes.Pp
1060914b0d2SPeter Hawkins.Bl -tag -width "Other Information:" -compact -offset indent
1079b50d902SRodney W. Grimes.It Login:
1089b50d902SRodney W. Grimesuser's login name
1099b50d902SRodney W. Grimes.It Password:
1109b50d902SRodney W. Grimesuser's encrypted password
1119b50d902SRodney W. Grimes.It Uid:
1129b50d902SRodney W. Grimesuser's login
1139b50d902SRodney W. Grimes.It Gid:
1149b50d902SRodney W. Grimesuser's login group
115f4b12e0aSMatthew Dillon.It Class:
116f4b12e0aSMatthew Dillonuser's general classification
1179b50d902SRodney W. Grimes.It Change:
1189b50d902SRodney W. Grimespassword change time
1199b50d902SRodney W. Grimes.It Expire:
1209b50d902SRodney W. Grimesaccount expiration time
121f4b12e0aSMatthew Dillon.It Full Name:
122f4b12e0aSMatthew Dillonuser's real name
123a041dfadSGuy Helmer.It Office Location:
124a041dfadSGuy Helmeruser's office location (1)
125f4b12e0aSMatthew Dillon.It Office Phone:
126f4b12e0aSMatthew Dillonuser's office phone (1)
127a041dfadSGuy Helmer.It Home Phone:
128a041dfadSGuy Helmeruser's home phone (1)
129f4b12e0aSMatthew Dillon.It Other Information:
130f4b12e0aSMatthew Dillonany locally defined parameters for user (1)
1319b50d902SRodney W. Grimes.It Home Directory:
1329b50d902SRodney W. Grimesuser's home directory
1339b50d902SRodney W. Grimes.It Shell:
1349b50d902SRodney W. Grimesuser's login shell
135f4b12e0aSMatthew Dillon.Pp
136f4b12e0aSMatthew Dillon.It NOTE(1) -
137f4b12e0aSMatthew DillonIn the actual master.passwd file, these fields are comma-delimited
138f4b12e0aSMatthew Dillonfields embedded in the FullName field.
1399b50d902SRodney W. Grimes.El
1409b50d902SRodney W. Grimes.Pp
1419b50d902SRodney W. GrimesThe
1429b50d902SRodney W. Grimes.Ar login
1439b50d902SRodney W. Grimesfield is the user name used to access the computer account.
1449b50d902SRodney W. Grimes.Pp
1459b50d902SRodney W. GrimesThe
1469b50d902SRodney W. Grimes.Ar password
1479b50d902SRodney W. Grimesfield contains the encrypted form of the user's password.
1489b50d902SRodney W. Grimes.Pp
1499b50d902SRodney W. GrimesThe
1509b50d902SRodney W. Grimes.Ar uid
1519b50d902SRodney W. Grimesfield is the number associated with the
1529b50d902SRodney W. Grimes.Ar login
1539b50d902SRodney W. Grimesfield.
1549b50d902SRodney W. GrimesBoth of these fields should be unique across the system (and often
1559b50d902SRodney W. Grimesacross a group of systems) as they control file access.
1569b50d902SRodney W. Grimes.Pp
1579b50d902SRodney W. GrimesWhile it is possible to have multiple entries with identical login names
1586a3e8b0aSRuslan Ermilovand/or identical user id's, it is usually a mistake to do so.
1596a3e8b0aSRuslan ErmilovRoutines
1609b50d902SRodney W. Grimesthat manipulate these files will often return only one of the multiple
1619b50d902SRodney W. Grimesentries, and that one by random selection.
1629b50d902SRodney W. Grimes.Pp
1639b50d902SRodney W. GrimesThe
164c0d87a13SEd Schouten.Ar gid
1659b50d902SRodney W. Grimesfield is the group that the user will be placed in at login.
166753d686dSRuslan ErmilovSince
167753d686dSRuslan Ermilov.Bx
168753d686dSRuslan Ermilovsupports multiple groups (see
1699b50d902SRodney W. Grimes.Xr groups 1 )
1709b50d902SRodney W. Grimesthis field currently has little special meaning.
1719b50d902SRodney W. GrimesThis field may be filled in with either a number or a group name (see
1729b50d902SRodney W. Grimes.Xr group 5 ) .
1739b50d902SRodney W. Grimes.Pp
1749b50d902SRodney W. GrimesThe
175f4b12e0aSMatthew Dillon.Ar class
176f4b12e0aSMatthew Dillonfield references class descriptions in
17789368610SAlexey Zelkin.Pa /etc/login.conf
178f4b12e0aSMatthew Dillonand is typically used to initialize the user's system resource limits
179f4b12e0aSMatthew Dillonwhen they login.
180f4b12e0aSMatthew Dillon.Pp
181f4b12e0aSMatthew DillonThe
1829b50d902SRodney W. Grimes.Ar change
1839b50d902SRodney W. Grimesfield is the date by which the password must be changed.
1849b50d902SRodney W. Grimes.Pp
1859b50d902SRodney W. GrimesThe
1869b50d902SRodney W. Grimes.Ar expire
1879b50d902SRodney W. Grimesfield is the date on which the account expires.
1889b50d902SRodney W. Grimes.Pp
1899b50d902SRodney W. GrimesBoth the
1909b50d902SRodney W. Grimes.Ar change
1919b50d902SRodney W. Grimesand
1929b50d902SRodney W. Grimes.Ar expire
193e1e5fdf6SAlexey Zelkinfields should be entered in the form
194e1e5fdf6SAlexey Zelkin.Dq month day year
195e1e5fdf6SAlexey Zelkinwhere
1969b50d902SRodney W. Grimes.Ar month
1979b50d902SRodney W. Grimesis the month name (the first three characters are sufficient),
1989b50d902SRodney W. Grimes.Ar day
1999b50d902SRodney W. Grimesis the day of the month, and
2009b50d902SRodney W. Grimes.Ar year
2019b50d902SRodney W. Grimesis the year.
2029b50d902SRodney W. Grimes.Pp
203f4b12e0aSMatthew DillonFive fields are available for storing the user's
204f4b12e0aSMatthew Dillon.Ar full name , office location ,
205f4b12e0aSMatthew Dillon.Ar work
206f4b12e0aSMatthew Dillonand
207f4b12e0aSMatthew Dillon.Ar home telephone
208f4b12e0aSMatthew Dillonnumbers and finally
209f4b12e0aSMatthew Dillon.Ar other information
210f4b12e0aSMatthew Dillonwhich is a single comma delimited string to represent any additional
211fce2ca94SPhilippe Charniergecos fields (typically used for site specific user information).
212a041dfadSGuy HelmerNote that
213a041dfadSGuy Helmer.Xr finger 1
214a041dfadSGuy Helmerwill display the office location and office phone together under the
215a041dfadSGuy Helmerheading
216c8f6f8e4SMateusz Piotrowski.Ar Office\&: .
2179b50d902SRodney W. Grimes.Pp
2189b50d902SRodney W. GrimesThe user's
2199b50d902SRodney W. Grimes.Ar home directory
2206414fabfSAlexey Zelkinis the full
2216414fabfSAlexey Zelkin.Ux
2226414fabfSAlexey Zelkinpath name where the user
2239b50d902SRodney W. Grimeswill be placed at login.
2249b50d902SRodney W. Grimes.Pp
2259b50d902SRodney W. GrimesThe
2269b50d902SRodney W. Grimes.Ar shell
2279b50d902SRodney W. Grimesfield is the command interpreter the user prefers.
2289b50d902SRodney W. GrimesIf the
2299b50d902SRodney W. Grimes.Ar shell
2309b50d902SRodney W. Grimesfield is empty, the Bourne shell,
2319b50d902SRodney W. Grimes.Pa /bin/sh ,
2329b50d902SRodney W. Grimesis assumed.
2339b50d902SRodney W. GrimesWhen altering a login shell, and not the super-user, the user
2349b50d902SRodney W. Grimesmay not change from a non-standard shell or to a non-standard
2359b50d902SRodney W. Grimesshell.
2369b50d902SRodney W. GrimesNon-standard is defined as a shell not found in
2379b50d902SRodney W. Grimes.Pa /etc/shells .
2389b50d902SRodney W. Grimes.Pp
2399b50d902SRodney W. GrimesOnce the information has been verified,
2406414fabfSAlexey Zelkin.Nm
2419b50d902SRodney W. Grimesuses
2429b50d902SRodney W. Grimes.Xr pwd_mkdb 8
2439b50d902SRodney W. Grimesto update the user database.
2449b50d902SRodney W. Grimes.Sh ENVIRONMENT
2459b50d902SRodney W. GrimesThe
2469b50d902SRodney W. Grimes.Xr vi 1
2476414fabfSAlexey Zelkineditor will be used unless the environment variable
2486414fabfSAlexey Zelkin.Ev EDITOR
2496414fabfSAlexey Zelkinis set to
2509b50d902SRodney W. Grimesan alternate editor.
2519b50d902SRodney W. GrimesWhen the editor terminates, the information is re-read and used to
2529b50d902SRodney W. Grimesupdate the user database itself.
2539b50d902SRodney W. GrimesOnly the user, or the super-user, may edit the information associated
2549b50d902SRodney W. Grimeswith the user.
2559a602accSSheldon Hearn.Pp
2569a602accSSheldon HearnSee
2579a602accSSheldon Hearn.Xr pwd_mkdb 8
2589a602accSSheldon Hearnfor an explanation of the impact of setting the
2599a602accSSheldon Hearn.Ev PW_SCAN_BIG_IDS
2609a602accSSheldon Hearnenvironment variable.
26136715722SBill Paul.Sh NIS INTERACTION
2623898680cSPhilippe CharnierThe
2633898680cSPhilippe Charnier.Nm
2643898680cSPhilippe Charnierutility can also be used in conjunction with NIS, however some restrictions
26536715722SBill Paulapply.
26636715722SBill PaulCurrently,
2676414fabfSAlexey Zelkin.Nm
26836715722SBill Paulcan only make changes to the NIS passwd maps through
269c2dfe9feSBill Paul.Xr rpc.yppasswdd 8 ,
270c2dfe9feSBill Paulwhich normally only permits changes to a user's password, shell and GECOS
27187faa07bSSheldon Hearnfields.
27287faa07bSSheldon HearnExcept when invoked by the super-user on the NIS master server,
2736414fabfSAlexey Zelkin.Nm
274c2dfe9feSBill Paul(and, similarly,
275c2dfe9feSBill Paul.Xr passwd 1 )
276c2dfe9feSBill Paulcannot use the
277c2dfe9feSBill Paul.Xr rpc.yppasswdd 8
278c2dfe9feSBill Paulserver to change other user information or
279c2dfe9feSBill Pauladd new records to the NIS passwd maps.
28036715722SBill PaulFurthermore,
281c2dfe9feSBill Paul.Xr rpc.yppasswdd 8
28236715722SBill Paulrequires password authentication before it will make any
28387faa07bSSheldon Hearnchanges.
28487faa07bSSheldon HearnThe only user allowed to submit changes without supplying
285c2dfe9feSBill Paula password is the super-user on the NIS master server; all other users,
286c2dfe9feSBill Paulincluding those with root privileges on NIS clients (and NIS slave
287c2dfe9feSBill Paulservers) must enter a password.
288c2dfe9feSBill Paul(The super-user on the NIS master is allowed to bypass these restrictions
289c2dfe9feSBill Paullargely for convenience: a user with root access
290c2dfe9feSBill Paulto the NIS master server already has the privileges required to make
291c2dfe9feSBill Paulupdates to the NIS maps, but editing the map source files by hand can
292c2dfe9feSBill Paulbe cumbersome.
29336715722SBill Paul.Pp
294c2dfe9feSBill PaulNote: these exceptions only apply when the NIS master server is a
295e1e5fdf6SAlexey Zelkin.Fx
296e1e5fdf6SAlexey Zelkinsystem).
297c2dfe9feSBill Paul.Pp
298c2dfe9feSBill PaulConsequently, except where noted, the following restrictions apply when
2996414fabfSAlexey Zelkin.Nm
30036715722SBill Paulis used with NIS:
30136715722SBill Paul.Bl -enum -offset indent
30236715722SBill Paul.It
303e1e5fdf6SAlexey Zelkin.Em "Only the shell and GECOS information may be changed" .
30436715722SBill PaulAll other
30536715722SBill Paulfields are restricted, even when
3066414fabfSAlexey Zelkin.Nm
307c2dfe9feSBill Paulis invoked by the super-user.
308c2dfe9feSBill PaulWhile support for
30936715722SBill Paulchanging other fields could be added, this would lead to
31036715722SBill Paulcompatibility problems with other NIS-capable systems.
31136715722SBill PaulEven though the super-user may supply data for other fields
31236715722SBill Paulwhile editing an entry, the extra information (other than the
313c8f6f8e4SMateusz Piotrowskipassword \(em see below) will be silently discarded.
314c2dfe9feSBill Paul.Pp
315c2dfe9feSBill PaulException: the super-user on the NIS master server is permitted to
316c2dfe9feSBill Paulchange any field.
31736715722SBill Paul.It
318e1e5fdf6SAlexey Zelkin.Em "Password authentication is required" .
3193898680cSPhilippe CharnierThe
3203898680cSPhilippe Charnier.Nm
3213898680cSPhilippe Charnierutility will prompt for the user's NIS password before effecting
32287faa07bSSheldon Hearnany changes.
32387faa07bSSheldon HearnIf the password is invalid, all changes will be
32436715722SBill Pauldiscarded.
325c2dfe9feSBill Paul.Pp
326c2dfe9feSBill PaulException: the super-user on the NIS master server is allowed to
3274e86fcacSSheldon Hearnsubmit changes without supplying a password.
3284e86fcacSSheldon Hearn(The super-user may
329c2dfe9feSBill Paulchoose to turn off this feature using the
330c2dfe9feSBill Paul.Fl o
331c2dfe9feSBill Paulflag, described below.)
33236715722SBill Paul.It
333e1e5fdf6SAlexey Zelkin.Em "Adding new records to the local password database is discouraged" .
3343898680cSPhilippe CharnierThe
3353898680cSPhilippe Charnier.Nm
3363898680cSPhilippe Charnierutility will allow the administrator to add new records to the
33736715722SBill Paullocal password database while NIS is enabled, but this can lead to
33836715722SBill Paulsome confusion since the new records are appended to the end of
33936715722SBill Paulthe master password file, usually after the special NIS '+' entries.
34036715722SBill PaulThe administrator should use
34136715722SBill Paul.Xr vipw 8
34236715722SBill Paulto modify the local password
34336715722SBill Paulfile when NIS is running.
344c2dfe9feSBill Paul.Pp
345c2dfe9feSBill PaulThe super-user on the NIS master server is permitted to add new records
346c2dfe9feSBill Paulto the NIS password maps, provided the
347c2dfe9feSBill Paul.Xr rpc.yppasswdd 8
348c2dfe9feSBill Paulserver has been started with the
349c2dfe9feSBill Paul.Fl a
350c2dfe9feSBill Paulflag to permitted additions (it refuses them by default).
3513898680cSPhilippe CharnierThe
3523898680cSPhilippe Charnier.Nm
3533898680cSPhilippe Charnierutility tries to update the local password database by default; to update the
354c2dfe9feSBill PaulNIS maps instead, invoke chpass with the
355c2dfe9feSBill Paul.Fl y
356c2dfe9feSBill Paulflag.
35736715722SBill Paul.It
358e1e5fdf6SAlexey Zelkin.Em "Password changes are not permitted".
35936715722SBill PaulUsers should use
36036715722SBill Paul.Xr passwd 1
36136715722SBill Paulor
36236715722SBill Paul.Xr yppasswd 1
36387faa07bSSheldon Hearnto change their NIS passwords.
36487faa07bSSheldon HearnThe super-user is allowed to specify
365e1e5fdf6SAlexey Zelkina new password (even though the
366e1e5fdf6SAlexey Zelkin.Dq Password:
367e1e5fdf6SAlexey Zelkinfield does not show
36836715722SBill Paulup in the editor template, the super-user may add it back by hand),
36936715722SBill Paulbut even the super-user must supply the user's original password
37036715722SBill Paulotherwise
371c2dfe9feSBill Paul.Xr rpc.yppasswdd 8
37236715722SBill Paulwill refuse to update the NIS maps.
373c2dfe9feSBill Paul.Pp
374c2dfe9feSBill PaulException: the super-user on the NIS master server is permitted to
375c2dfe9feSBill Paulchange a user's NIS password with
3768fe908efSRuslan Ermilov.Nm .
37736715722SBill Paul.El
37892194236SBill Paul.Pp
379c2dfe9feSBill PaulThere are also a few extra option flags that are available when
3806414fabfSAlexey Zelkin.Nm
38198c88647SAndreas Schulzis compiled with NIS support:
382303869edSMateusz Piotrowski.Bl -tag -width "-d domain"
383c2dfe9feSBill Paul.It Fl d Ar domain
384c2dfe9feSBill PaulSpecify a particular NIS domain.
3853898680cSPhilippe CharnierThe
3863898680cSPhilippe Charnier.Nm
3873898680cSPhilippe Charnierutility uses the system domain name by default, as set by the
388c2dfe9feSBill Paul.Xr domainname 1
389014f5fe7SRuslan Ermilovutility.
39087faa07bSSheldon HearnThe
391c2dfe9feSBill Paul.Fl d
392c2dfe9feSBill Pauloption can be used to override a default, or to specify a domain
393c2dfe9feSBill Paulwhen the system domain name is not set.
394c2dfe9feSBill Paul.It Fl h Ar host
39587faa07bSSheldon HearnSpecify the name or address of an NIS server to query.
39687faa07bSSheldon HearnNormally,
3976414fabfSAlexey Zelkin.Nm
398c2dfe9feSBill Paulwill communicate with the NIS master host specified in the
399c2dfe9feSBill Paul.Pa master.passwd
400c2dfe9feSBill Paulor
401c2dfe9feSBill Paul.Pa passwd
40287faa07bSSheldon Hearnmaps.
40387faa07bSSheldon HearnOn hosts that have not been configured as NIS clients, there is
404c2dfe9feSBill Paulno way for the program to determine this information unless the user
40587faa07bSSheldon Hearnprovides the hostname of a server.
40687faa07bSSheldon HearnNote that the specified hostname need
407c2dfe9feSBill Paulnot be that of the NIS master server; the name of any server, master or
408c2dfe9feSBill Paulslave, in a given NIS domain will do.
409c2dfe9feSBill Paul.Pp
410c2dfe9feSBill PaulWhen using the
411c2dfe9feSBill Paul.Fl d
412e1e5fdf6SAlexey Zelkinoption, the hostname defaults to
413e1e5fdf6SAlexey Zelkin.Dq localhost .
414e1e5fdf6SAlexey ZelkinThe
415c2dfe9feSBill Paul.Fl h
416c2dfe9feSBill Pauloption can be used in conjunction with the
417c2dfe9feSBill Paul.Fl d
418c2dfe9feSBill Pauloption, in which case the user-specified hostname will override
419c2dfe9feSBill Paulthe default.
420303869edSMateusz Piotrowski.It Fl l
421303869edSMateusz PiotrowskiForce
422303869edSMateusz Piotrowski.Nm
423303869edSMateusz Piotrowskito modify the local copy of a user's password
424303869edSMateusz Piotrowskiinformation in the event that a user exists in both
425303869edSMateusz Piotrowskithe local and NIS databases.
426c2dfe9feSBill Paul.It Fl o
427c2dfe9feSBill PaulForce the use of RPC-based updates when communicating with
428c2dfe9feSBill Paul.Xr rpc.yppasswdd 8
429e1e5fdf6SAlexey Zelkin.Pq Dq old-mode .
430c2dfe9feSBill PaulWhen invoked by the super-user on the NIS master server,
4316414fabfSAlexey Zelkin.Nm
432c2dfe9feSBill Paulallows unrestricted changes to the NIS passwd maps using dedicated,
4336414fabfSAlexey Zelkinnon-RPC-based mechanism (in this case, a
4346414fabfSAlexey Zelkin.Ux
4356a3e8b0aSRuslan Ermilovdomain socket).
4366a3e8b0aSRuslan ErmilovThe
437c2dfe9feSBill Paul.Fl o
438c2dfe9feSBill Paulflag can be used to force
4396414fabfSAlexey Zelkin.Nm
44087faa07bSSheldon Hearnto use the standard update mechanism instead.
44187faa07bSSheldon HearnThis option is provided
442c2dfe9feSBill Paulmainly for testing purposes.
443303869edSMateusz Piotrowski.It Fl y
444303869edSMateusz PiotrowskiOpposite effect of
445303869edSMateusz Piotrowski.Fl l .
446303869edSMateusz PiotrowskiThis flag is largely redundant since
447303869edSMateusz Piotrowski.Nm
448303869edSMateusz Piotrowskioperates on NIS entries by default if NIS is enabled.
44992194236SBill Paul.El
4509b50d902SRodney W. Grimes.Sh FILES
4519b50d902SRodney W. Grimes.Bl -tag -width /etc/master.passwd -compact
4529b50d902SRodney W. Grimes.It Pa /etc/master.passwd
4536414fabfSAlexey Zelkinthe user database
4549b50d902SRodney W. Grimes.It Pa /etc/passwd
4556414fabfSAlexey Zelkina Version 7 format password file
456*17054abfSCeri Davies.It Pa /etc/pw.XXXXXX
457*17054abfSCeri Daviestemporary file
4589b50d902SRodney W. Grimes.It Pa /etc/shells
4596414fabfSAlexey Zelkinthe list of approved shells
4609b50d902SRodney W. Grimes.El
461dda1987fSMateusz Piotrowski.Sh EXAMPLES
462dda1987fSMateusz PiotrowskiChange the shell of the current user to
463dda1987fSMateusz Piotrowski.Ql /usr/local/bin/zsh :
464dda1987fSMateusz Piotrowski.Bd -literal -offset indent
465dda1987fSMateusz Piotrowskichsh -s /usr/local/bin/zsh
466dda1987fSMateusz Piotrowski.Ed
4679b50d902SRodney W. Grimes.Sh SEE ALSO
4689b50d902SRodney W. Grimes.Xr finger 1 ,
469da1ff3cbSWolfram Schneider.Xr login 1 ,
4709b50d902SRodney W. Grimes.Xr passwd 1 ,
4719b50d902SRodney W. Grimes.Xr getusershell 3 ,
472b5d2ebccSBruce Evans.Xr login.conf 5 ,
4739b50d902SRodney W. Grimes.Xr passwd 5 ,
47471997d4bSSean Chittenden.Xr pw 8 ,
4759b50d902SRodney W. Grimes.Xr pwd_mkdb 8 ,
476b5d2ebccSBruce Evans.Xr vipw 8
4779b50d902SRodney W. Grimes.Rs
4789b50d902SRodney W. Grimes.%A Robert Morris
4799b50d902SRodney W. Grimes.%A Ken Thompson
4809b50d902SRodney W. Grimes.%T "UNIX Password security"
4819b50d902SRodney W. Grimes.Re
4829b50d902SRodney W. Grimes.Sh HISTORY
4839b50d902SRodney W. GrimesThe
4848fe908efSRuslan Ermilov.Nm
485014f5fe7SRuslan Ermilovutility appeared in
4869b50d902SRodney W. Grimes.Bx 4.3 Reno .
4876c7216dfSRuslan Ermilov.Sh BUGS
4886c7216dfSRuslan ErmilovUser information should (and eventually will) be stored elsewhere.
489