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

Changing Ownership of NIS+ Objects and Entries

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

Changing an NIS+ Object Owner With nischown

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


nischown new-owner object

Where:

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

The example below changes the owner of the hosts table in the doc.com. domain to the user named lincoln whose home domain is doc.com.:


client% nischown lincoln.doc.com. hosts.org_dir.doc.com.

Changing an NIS+ Table Entry Owner With nischown

The syntax for changing a table entry's owner uses an indexed entry to identify the entry, as shown in the following, where:

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

The example below changes the owner of an entry in the hosts table of the doc.com. domain to takeda whose home domain is doc.com. The entry is the one whose value in the name column is virginia.


client% nischown takeda.doc.com. '[name=virginia],hosts.org_dir.doc.com.'