CHFN(5) COMMAND REFERENCE CHFN(5)
NAME
chfn - definitions for password file gecos field contents
SYNOPSIS
/usr/lib/chfn
DESCRIPTION
The chfn file is a collection of regular expressions that
are used by the chfn(1) utility to check for legal input
while updating the password file gecos field. They specify
the order for the entries and restrict input for each
section of the field.
The this file is used one line at a time by chfn(1) first to
produce the prompt string for the entry and then to check
the user's input. Line format is:
[!][prompt_string];[regular_expr [ | regular_expr ]...]
The prompt_string is the prompt to be issued for this
portion of the gecos field. Example entries should be
included here. The current content of the sub-field is
printed following this prompt string.
If the first character of the prompt string is "!" that
sub-field can be changed only by a person logged in as root.
It will be skipped in chfn(1) calls for any other user. If
restricted sub-fields exist, placing them at the end of the
gecos field will enhance execution speed.
There is no "and" condition and if the beginning of the line
and the end of the line are significant they must be
included in the pattern. If no pattern exists any input
will be accepted.
The "or" construct has beed added to enhance the restricted
environment of regular expressions. If "|" is used the
patterns specified are checked in order. The first match
stops the scan.
EXAMPLES
The following is an example file. It prompts for a name and
accepts any input; then asks for a work phone and checks for
a number of the form XXX-XXXX; delivery station is
requested next and a number for mail delivery is requested;
the user is then asked for a home phone number and its form
checked; finally, if the user is super user the home machine
entry is requested. Note that all patterns include start of
line and end of line indications.
Printed 10/17/86 1
CHFN(5) COMMAND REFERENCE CHFN(5)
Name;
Work Phone (Example: 555-1212);^[1-9][0-9][0-9]-[0-9][0-9][0-9][0-9]$
Delivery Station (Example: 77-215);^[Y0-9][0-9]-[0-9][0-9][0-9]$
Home Phone;^[1-9][0-9][0-9]-[0-9][0-9][0-9][0-9]$
!Home Machine (Example: tekecs);^tektronix$|^tekecs$|^gumby$
FILES
/usr/lib/chfn
CAVEATS
If you are reading this page prior to the manual page for
chfn(1) it won't make much sense.
Regular expressions must be legal or changes will not be
accepted. No attempt is made to check the existing password
file entries for correctness, e.g. changes made with vipw(8)
are not verified.
This file allows local modification of the restrictions
placed on users for access to the password file, it helps
avoid mistakes. It does not stop the super user from making
changes outside the chfn(1) utility.
If changes are made to existing passwd(5) sequences the
prompts will be unrelated to the existing values until all
users have updated their information. Additions to the end
are the easiest to make. Changes to the information stored
here also affects finger(1n) output and must be coordinated
with the expected information there.
SEE ALSO
chfn(1), finger(1n), passwd(5), vipw(8).
Printed 10/17/86 2
%%index%%
na:72,93;
sy:165,155;
de:320,1621;
ex:1941,549;2634,303;
fi:2937,76;
ca:3013,1027;
se:4040,167;
%%index%%000000000129