Processing NIS source files with duplicate key values
I’m working on a task to migrate our NIS infrastructure from Solaris 10 to Linux (RHEL 6.6).
While making sure that the 70+ NIS maps used in the environment are generated identically on the Linux side, I’ve run into a discrepancy. There are a number of maps (i.e. group, netgroup) where long entries have been broken up into multiple records and we’ve been relying on their order of occurrence within the map’s source to handle the duplicate key values (In Solaris the FIRST such record is associated with the duplicate key value [i.e. UID, GID, etc..]).
It seems, however, that the opposite is occurring on the Linux side. In other words, it is the LAST record that is being used in that association (see below).
I'm trying to confirm if that is due to how NIS has been implemented in RHEL or if it's due to some configuration setting.
…
user::300:
usera::300:
…
[root@ src]# diff group.PHC group
231a232
usera::300:
[root@ src]# cd ../
[root@ yp]# make
gmake[1]: Entering directory /var/yp/eng'
/var/yp/eng'
Updating group.byname...
Updating group.bygid...
Updating netid.byname...
gmake[1]: Leaving directory
[root@ yp]#
[root@ yp]#
[root@ yp]# ypcat -k group.bygid | grep -w 300
300 usera::300:
[root@ yp]#
NOTE: In the Solaris environment the above command returns “300 user::300:”