Reverses the listing of users and hosts in network group files in NIS maps.
The revnetgroup command reverses the order in which hosts and users are listed in the /etc/netgroup file. The revnetgroup command is called from the /var/yp/Makefile file to produce output for creating either the netgroup.byuser or netgroup.byhost NIS map. Each line in the output file begins with a key formed by concatenating the host or user name with the domain name. Following the key is a list of groups to which the host or user belongs. The list is preceded by a tab, and each group is separated by a comma.
Note: The list of groups does not use the names of universal groups (groups that include all users in the network). Universal groups are listed under * (asterisk).
The revnetgroup command takes an optional file name if the default /etc/netgroup file is not desired. This feature provides users with flexibility to create custom network group maps.
Item | Description |
---|---|
-h | Produces output for creating the netgroup.byhost map. |
-u | Produces output for creating the netgroup.byuser map. |
revnetgroup -u
revnetgroup -h newgroup
The -h flag
used in this example causes the new /etc/newgroup file to list
host names before user names.Item | Description |
---|---|
/etc/netgroup | Contains lists of users and hosts in network groups. |
/var/yp/Makefile | Contains rules for making NIS maps. |