[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

chfn Command

Purpose

Changes a user's gecos information.

Syntax

chfnName ]

Description

The chfn command changes a user's gecos information. Gecos information is general information stored in the /etc/passwd file. This information is not used by the system. The type of information you store in this field is up to you. Some system administrators store information such as the user's full name, phone number, and office number.

The chfn command is interactive. After you enter the command, the system displays the current gecos information and prompts you to change it. To exit the chfn command without changing any information, press Enter.

You can use any printable characters in the gecos information string except a : (colon), which is an attribute delimiter.

By default, the chfn command changes the gecos information of the user who runs the command. You can also use this command to change the gecos information of other users. However, you must have execute permission for the chuser command to change the gecos information for another user.

Security

Access Control: All users should have execute (x) access to this command since the program enforces its own access policy. This command should be installed as a program in the trusted computing base (TCB). The command should be owned by the security group with the setgid (SGID) bit set.

Files Accessed:

Mode File
x /usr/bin/chuser
rw /etc/passwd

Examples

  1. If you are John Smith and want to change your gecos information, enter:
    chfn 
    The current gecos string appears, followed by a prompt that asks if a change should be made:
    current gecos:
         "John Smith;555-1746;room 74"
    change (y/n)? >  
    To change the room number from 74 to 36, enter y to request a change and enter the revised information when the to? > prompt appears:
    current gecos:
         "John Smith;555-1746;room 74"
    change (y/n)? > y
    to? > John Smith;555-1746;room 36 
  2. If you are John Smith and want to view your gecos information but not change it, enter:
    chfn 
    The current gecos string appears, followed by a prompt that asks if a change should be made:
    current gecos:
         "John Smith;555-1746;room 74"
    change (y/n)? >  
    If you decide not to change the information, enter n after the change (y/n)? prompt or press the Enter key:
    current gecos:
         "John Smith;555-1746;room 74"
    change (y/n)? > n
    This is your opportunity to indicate that the information should remain unchanged. If you enter y, you are committed to enter an information string or use the Enter key to set the string to null. Note that the function of the Enter key differs before and after a y character is entered.
  3. If you have execute (x) permission for the chuser command and want to change the gecos information for the johns user, enter:
    chfn johns 
    The current gecos string and prompts appear as in Example 1.

Files

/usr/bin/chfn Specifies the path to the chfn command.
/usr/bin/chuser Changes user information.
/etc/passwd Contains basic user attributes.

Related Information

The chgroup command, chgrpmem command, chuser command, lsgroup command, lsuser command, mkgroup command, mkuser command, passwd command, pwdadm command, rmgroup command, rmuser command, setgroups command, setsenv command.

Security Administration in AIX Version 4.3 System Management Guide: Operating System and Devices describes the identification and authentication of users, discretionary access control, the trusted computing base, and auditing.


[ Previous | Next | Contents | Glossary | Home | Search ]