System Administration Guide: Naming and Directory Services (NIS+)

Changing an NIS+ Object or Entry's Group

The nischgrp command changes the group of one or more objects or table entries. To use it, you must have modify rights to the object or entry. The nischgrp command cannot change the group of a column, since the group assigned to a table's columns is the same as the group assigned to the table. To change a column's group owner, you must change the table's group owner.

Changing an NIS+ Object's Group With nischgrp

To change an object's group, use the following syntax:


nischgrp group object 

Where:

Be sure to append the domain name to both the object name and new group name.

The example below changes the group of the hosts table in the doc.com. domain to admins.doc.com.:


client% nischgrp admins.doc.com. hosts.org_dir.doc.com.

Changing an NIS+ Table Entry's Group With nischgrp

The syntax for changing a table entry's group uses an indexed entry to identify the entry, as shown below (this syntax is fully described in NIS+ Syntax for Objects and Table Entries).


nischgrp new-group [column=value,...],tablename

Where:

Be sure to append the domain name to both the new group name and the table name.

The example below changes the group of an entry in the hosts table of the doc.com. domain to sales.doc.com. The entry is the one whose value in the host name column is virginia.


client% nischgrp sales.doc.com. '[name=virginia],hosts.org_dir.doc.com.'