The administrator who created Xander's AIX user introduced a typo into his name in the GECOS information. To correct the mistake, you use the
chfn
command. This command works much like chsh
, where the command displays the current value, asks the user whether he or she wants to change it, and then changes the value to what was entered. Listing provides an example.Listing Example chfn command
# finger xander
Login name: xander In real life: Zander Cormany
Site Info: 317.555.1234
Directory: /home/xander Shell: /usr/bin/ksh
No Plan.
# chfn xander
xander's current gecos:
"Zander Cormany,317.555.1234"
Change (yes) or (no)? > yes
To?>Xander Cormany,317.555.1234
# finger xander
Login name: xander In real life: Xander Cormany
Site Info: 317.555.1234
Directory: /home/xander Shell: /usr/bin/ksh
No Plan.
|
Correcting the GECOS information may sound trivial, but it is helpful to the other administrators and users on the system. For example, if you're trying to find Xander's account but can't remember his user name, you could search for it through his GECOS information. Searching for his last name, which was correctly entered into the GECOS field, would quickly show me his user name. The
finger
command will search for all instances of the string entered in /etc/passwd's user name and real name in the first field of the GECOS information:# finger cormany
Login name: atc In real life: Adam Cormany
Directory: /home/cormany Shell: /bin/ksh
No Plan.
Login name: xander In real life: Xander Cormany
Site Info: 317.555.1234
Directory: /home/xander Shell: /usr/bin/ksh
No Plan.
|
No comments:
Post a Comment