[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

revnetgroup Command

Purpose

Reverses the listing of users and hosts in network group files in NIS maps.

Syntax

/usr/sbin/revnetgroup-h -u } [ File ]

Description

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.

Flags

-h Produces output for creating the netgroup.byhost map.
-u Produces output for creating the netgroup.byuser map.

Examples

  1. To cause the /etc/netgroup file to list user names before host names, modify the appropriate stanza in the /var/yp/Makefile to read:

    revnetgroup -u
  2. To create a new network group file, called newgroup, in the /etc directory, modify the appropriate stanza in the /var/yp/Makefile to read:

    revnetgroup -h newgroup

    The -h flag used in this example causes the new /etc/newgroup file to list host names before user names.

Files

/etc/netgroup Contains lists of users and hosts in network groups.
/var/yp/Makefile Contains rules for making NIS maps.

Related Information

The makedbm command, ypinit command, yppush command.

Network File System (NFS) Overview for System Management in AIX 5L Version 5.2 System Management Guide: Communications and Networks.

Network Information Service (NIS) in AIX 5L Version 5.2 Network Information Services (NIS and NIS+) Guide.

NIS Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]