nischgrp Command

Purpose

Changes the group owner of a NIS+ object.

Syntax

nischgrp [ -A ] [ -f ] [ -L ] [ -P ] group name

Description

The nischgrp command changes the group owner of the NIS+ objects or entries specified by name to the specified NIS+ group. Entries are specified using indexed names. If group is not a fully qualified NIS+ group name, it is resolved using the directory search path. For additional information, see the nisdefaults command.

The only restriction on changing an object's group owner is that you must have modify permissions for the object.

This command will fail if the master NIS+ server is not running.

The NIS+ server will check the validity of the group name prior to effecting the modification.

Flags

Item Description
-A Modifies all entries in all tables in the concatenation path that match the search criterion specified in name. This flag implies the -P flag.
-f Forces the operation and fails silently if it does not succeed.
-L Follows links and changes the group owner of the linked object or entries rather than the group owner of the link itself.
-P Follows the concatenation path within a named table. This flag is valid when either name is an indexed name or the -L flag is also specified and the named object is a link pointing to entries.

Environment

Item Description
NIS_PATH If this variable is set and the NIS+ name is not fully qualified, each directory specified will be searched until the object is found (see the nisdefaults command).

Exit Status

This command returns the following exit values:

Item Description
0 Success
1 Failure

Examples

  1. To change the group owner of an object to a group in a different domain, enter:
    nischgrp newgroup.remote.domain. object
  2. To change the group owner of an object to a group in the local domain, enter:
    nischgrp my-buds object
  3. To change the group owner for a password entry, enter:
    nischgrp admins '[uid=99],passwd.org_dir'

    admins is a NIS+ group in the same domain.

  4. To change the group owner of the object or entries pointed to by a link, enter:
    nischgrp -L my-buds linkname
  5. To change the group owner of all entries in the hobbies table, enter:
    nischgrp my-buds '[],hobbies'