Changes a user's gecos information.
chfn [ Name ]
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.
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.
Mode | File |
---|---|
x | /usr/bin/chuser |
rw | /etc/passwd |
chfnThe 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
chfnThe 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)? > nThis 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.
chfn johnsThe current gecos string and prompts appear as in Example 1.
/usr/bin/chfn | Specifies the path to the chfn command. |
/usr/bin/chuser | Changes user information. |
/etc/passwd | Contains basic user attributes. |
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.