Changes the owner of one or more NIS+ objects or entries.
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.
Item | Description |
---|---|
-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. |
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). |
This command returns the following exit values:
Item | Description |
---|---|
0 | Success |
1 | Failure |
nischown bob.remote.domain. object
nischown skippy object
nischown bob.remote.domain. '[uid=99],passwd.org_dir'
nischown -L skippy linkname