Changes a user's gecos information.
chfn [ -R load_module ] [ 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.
For users that were created using an alternate Identification and Authentication mechanism (I&A) , the -R flag can be used to specify the I&A load module used to create the user. Load modules are defined in the /usr/lib/security/methods.cfg file.
-R | Specifies the loadable I&A module used to change the user's gecos information |
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 |
Changing a user's gecos information may not be supported by all loadable I&A modules. If the loadable I&A module does not change a user's gecos information, an error is reported.
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, type y to request a change and type 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
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, type 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.
chfn johns
The current gecos string and prompts appear as in Example 1.
chfn -R LDAP davis
/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 5L Version 5.2 System Management Concepts: Operating System and Devices describes the identification and authentication of users, discretionary access control, the trusted computing base, and auditing.