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

Commands Reference, Volume 4

nischmod Command

Purpose

Changes the access rights on a NIS+ object.

Syntax

nischmod [ -A ] [ -f ] [ -L ] [ -P ] mode name...

Description

The nischmod command changes the access rights (mode) of the NIS+ objects or entries specified by name to mode. Entries are specified using indexed names. Only principals with modify access to an object may change its mode.

mode has the following form:

rights [,rights]...

rights has the form:

[ who ] op permission [ op permission ]...

who is a combination of:

n Nobody's permissions
o Owner's permissions
g Group's permissions
w World's permissions
a All, or owg

If who is omitted, the default is a.

op is one of:

+ Grants the permission
- Revokes the permission
= Sets the permissions explicitly

permission is any combination of:

r Read
m Modify
c Create
d Destroy

Flags

-A Modifies all entries in all tables in the concatenation path that match the search criteria 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 permission of the linked object or entries rather than the permission of the link itself.
-P Follows the concatenation path within a named table. This flag is only applicable when either name is an indexed name or the -L flag is also specified and the named object is a link pointing to an entry.

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 give everyone read access to an object. (that is, access for owner, group, and all), enter:

    nischmod a+r object
  2. To deny create and modify privileges to group and unauthenticated clients (nobody), enter:

    nischmod gn-cm object
  3. To set a complex set of permissions for an object, enter:

    nischmod o=rmcd,g=rm,w=rc,n=r object
  4. To set the permissions of an entry in the password table so that the group owner can modify them, enter:

    nischmod g+m '[uid=55],passwd.org_dir'
  5. To change the permissions of a linked object, enter:

    nischmod -L w+mr linkname

Related Information

The chmod command, nischgrp command, nischown command, nisdefaults command.

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