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

Commands Reference, Volume 4

nischown Command

Purpose

Changes the owner of one or more NIS+ objects or entries.

Syntax

nischown [ -A ] [ -f ] [ -L ] [ -P ] owner name...

Description

The nischown command changes the owner of the NIS+ objects or entries specified by name to owner. Entries are specified using indexed names. If owner is not a fully qualified NIS+ principal name (see the nisaddcred command), the default domain (see the nisdefaults command) will be appended to it.

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

Note: If you are the current owner of an object and you change ownership, you may not be able to regain ownership unless you have modify access to the new object.

The command fails if the master NIS+ server is not running.

The NIS+ server will check the validity of the name before making the modification.

Flags

-A Modifies all entries in all tables in the concatenation path that match the search criteria specified in name. It implies the -P flag.
-f Forces the operation and fails silently if it does not succeed.
-L Follows links and changes the owner of the linked object or entries rather than the owner of the link itself.
-P Follows the concatenation path within a named table. This flag is only meaningful 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

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:

0 Success
1 Failure

Examples

  1. To change the owner of an object to a principal in a different domain, enter:

    nischown bob.remote.domain. object
  2. To change the owner of an object to a principal in the local domain, enter:

    nischown skippy object
  3. To change the owner of an entry in the passwd table, enter:

    nischown bob.remote.domain. '[uid=99],passwd.org_dir'
  4. To change the object or entries pointed to by a link, enter:

    nischown -L skippy linkname

Related Information

The nisaddcred command, nischgrp command, nischttl command, nischmod command, nisdefaults command.

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