PWGMAP(8,C) AIX Commands Reference PWGMAP(8,C) ------------------------------------------------------------------------------- pwgmap PURPOSE Maps password and group files into a table. SYNTAX pwgmap ---| DESCRIPTION When two disjoint networks are merged together, the password and group files between the two may need to be merged as well. The pwgmap command performs the first step of the transformation. It first prompts for the names of the files to be merged and copies their respective contents to passwd.data1, passwd.data2, group.data1, and group.data2 in the current directory. While producing the mapping tables, the uid/gid values and login/group names are used to determine uniqueness. The tables produced, passwd.map, and group.map, have format: password.map old old new new table changes uid login uid login --------------------------------------------------------- group.map old old new new table changes gid group gid group --------------------------------------------------------- After executing the pwgmap command, the system administrator should examine the mapping tables to see if the new values are acceptable. Entries are ordered alphabetically by old login or old group. The changes field allows one to see exactly what was modified and may contain entries Name and/or uid. If no changes occurred, none will be written instead. If while editing the map tables, the administrator discovers that he wants to ignore a particular entry, he may alter the changes field to ignore. However, it may be the case that two users or groups should actually be the same, but differ in either uid/gid or login/group name. In this situation, the administrator may simply want to fold one user/group into another by modifying the changes, new uid/new gid, and new login/new group fields (see example below). The table field gives a positional indicator where the entry resides. It may contain 1, 2, or both. Processed July 12, 1991 PWGMAP(8,C) 1 PWGMAP(8,C) AIX Commands Reference PWGMAP(8,C) The algorithm used by the pwgmap command works as follows: If a login/uid pair matches between password files, they are assumed to be identical entries. If two logins are the same, but the uids differ, the case is changed, a letter at a time for one of the names until a difference is found; if two uids are the same but the logins are different, one of the ids is altered by taking the largest unused id value and adding one to it. Groups are treated in the same manner. The pwgmap command is for use in conjunction with the pwgmerge command and may only be executed by a system administrator with superuser authority. EXAMPLES The system administrator may see a table which looks something like: 1. old old new new table changes uid login uid login ---------------------------------------------------------------- 1 none 345 bershad 345 bershad 1 none 123 marsh 123 marsh 2 Name 129 marsh 129 Marsh 2 none 567 nathan 567 nathan If the system administrator determines that the two marsh's were actually the same person, then he should modify the table by altering the changes field to fold, the new uid field to 123, and the new login field to marsh. Every occurrence of uid 129 in the file system will be mapped to 123 by the pwgmerge program. If however, it is decided that they were different people, then the administrator may want to simply alter the new login field to bmarsh if the user's name is Brian Marsh. 2. If the system administrator wishes, he can make two seemingly unrelated users map to the same person. Thus, by changing the entry for "nathan" to look like: old old new new table changes uid login uid login ---------------------------------------------------------------- 2 fold 567 nathan 345 bershad the user "nathan" will become "bershad" after the merge. This means that if user "nathan" was a member of any group, that name will now be replaced with "bershad" in the new group file. All files owned by uid 567 on the site represented by table 2, will be owned by uid 345. Similarly, groups themselves may be folded into one another with group membership consisting of the union of all the previous users. Processed July 12, 1991 PWGMAP(8,C) 2 PWGMAP(8,C) AIX Commands Reference PWGMAP(8,C) RELATED INFORMATION See the following command: "pwgmerge." See the passwd file in AIX Operating System Technical Reference. See Chapter 18 of the AIX Programming Tools and Interfaces for general information on using commands in an MBCS environment. Processed July 12, 1991 PWGMAP(8,C) 3