209 lines
4.7 KiB
HTML
209 lines
4.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CHFN</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CHFN</H1>
|
|
Section: User Commands (1)<BR>Updated: 05/28/2020<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
chfn - change real user name and information
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>chfn</B> [<I>options</I>] [<I>LOGIN</I>]
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<DD>The
|
|
<B>chfn</B>
|
|
command changes user fullname, office room number, office phone number, and home phone number information for a user's account. This information is typically printed by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+finger">finger</A></B>(1)
|
|
and similar programs. A normal user may only change the fields for her own account, subject to the restrictions in
|
|
/etc/login.defs. (The default configuration is to prevent users from changing their fullname.) The superuser may change any field for any account. Additionally, only the superuser may use the
|
|
<B>-o</B>
|
|
option to change the undefined portions of the GECOS field.
|
|
<P>
|
|
|
|
These fields must not contain any colons. Except for the
|
|
<I>other</I>
|
|
field, they should not contain any comma or equal sign. It is also recommended to avoid non-US-ASCII characters, but this is only enforced for the phone numbers. The
|
|
<I>other</I>
|
|
field is used to store accounting information used by other applications.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
The options which apply to the
|
|
<B>chfn</B>
|
|
command are:
|
|
<P>
|
|
|
|
<B>-f</B>, <B>--full-name</B> <I>FULL_NAME</I>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
Change the user's full name.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-h</B>, <B>--home-phone</B> <I>HOME_PHONE</I>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
Change the user's home phone number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-o</B>, <B>--other</B> <I>OTHER</I>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
Change the user's other GECOS information. This field is used to store accounting information used by other applications, and can be changed only by a superuser.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-r</B>, <B>--room</B> <I>ROOM_NUMBER</I>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
Change the user's room number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-R</B>, <B>--root</B> <I>CHROOT_DIR</I>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Apply changes in the
|
|
<I>CHROOT_DIR</I>
|
|
directory and use the configuration files from the
|
|
<I>CHROOT_DIR</I>
|
|
directory.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-u</B>, <B>--help</B>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Display help message and exit.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>-w</B>, <B>--work-phone</B> <I>WORK_PHONE</I>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Change the user's office phone number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
If none of the options are selected,
|
|
<B>chfn</B>
|
|
operates in an interactive fashion, prompting the user with the current values for all of the fields. Enter the new value to change the field, or leave the line blank to use the current value. The current value is displayed between a pair of
|
|
<B>[ ]</B>
|
|
marks. Without options,
|
|
<B>chfn</B>
|
|
prompts for the current user account.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>CONFIGURATION</H2>
|
|
|
|
<P>
|
|
|
|
The following configuration variables in
|
|
/etc/login.defs
|
|
change the behavior of this tool:
|
|
<P>
|
|
|
|
<B>CHFN_RESTRICT</B> (string)
|
|
<DL COMPACT><DT id="9"><DD>
|
|
This parameter specifies which values in the
|
|
<I>gecos</I>
|
|
field of the
|
|
/etc/passwd
|
|
file may be changed by regular users using the
|
|
<B>chfn</B>
|
|
program. It can be any combination of letters
|
|
<I>f</I>,
|
|
<I>r</I>,
|
|
<I>w</I>,
|
|
<I>h</I>, for Full name, Room number, Work phone, and Home phone, respectively. For backward compatibility,
|
|
<I>yes</I>
|
|
is equivalent to
|
|
<I>rwh</I>
|
|
and
|
|
<I>no</I>
|
|
is equivalent to
|
|
<I>frwh</I>. If not specified, only the superuser can make any changes. The most restrictive setting is better achieved by not installing
|
|
<B>chfn</B>
|
|
SUID.
|
|
</DL>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<P>
|
|
|
|
/etc/login.defs
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Shadow password suite configuration.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
/etc/passwd
|
|
<DL COMPACT><DT id="11"><DD>
|
|
User account information.
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+chsh">chsh</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+login.defs">login.defs</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+passwd">passwd</A></B>(5).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="12"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="13"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="14"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="16"><A HREF="#lbAF">CONFIGURATION</A><DD>
|
|
<DT id="17"><A HREF="#lbAG">FILES</A><DD>
|
|
<DT id="18"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:08 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|