Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
15.  Administering NIS+ Access Rights Specifying Access Rights in Commands Syntax for Access Rights Class, Operator, and Rights Syntax  Previous   Contents   Next 
   
 

Syntax for Owner and Group

  • Owner. To specify an owner, use an NIS+ principal name.

  • Group. To specify an NIS+ group, use an NIS+ group name with the domain name appended.

    Remember that principal names are fully qualified (principalname.domainname).

    For owner

principalname

For group

groupname.domainname

Syntax for Objects and Table Entries

Objects and table entries use different syntaxes.

  • Objects use simple object names.

  • Table entries use indexed names.

For objects

objectname

For table entries

columnname=value],tablename

Note - In this case, the brackets are part of the syntax.


Indexed names can specify more than one column-value pair. If so, the operation applies only to the entries that match all the column-value pairs. The more column-value pairs you provide, the more stringent the search.

For example:

Table 15-11 Object and Table Entry--Examples

Type

Example

Object

hosts.org_dir.sales.doc.com.

Table entry

`[uid=33555],passwd.org_dir.Eng.doc.com.'

Two-value table entry

`[name=sales,gid=2],group.org_dir.doc.com.'

Columns use a special version of indexed names. Because you can only work on columns with the nistbladm command, see"The nistbladm Command" for more information.

Displaying NIS+ Defaults--The nisdefaults Command

The nisdefaults command displays the seven default values currently active in the namespace. These default values are either

  • Preset values supplied by the NIS+ software

  • The defaults specified in the NIS_DEFAULTS environment variable (if you have NIS_DEFAULTS values set)

Any object that you create on this machine will automatically acquire these default values unless you override them with the -D option of the command you are using to create the object.

Table 15-12 The Seven NIS+ Default Values and nisdefaults Options

Default

Option

From

Description

Domain

-d

/etc/defaultdomain

Displays the home domain of the machine from which the command was entered.

Group

-g

NIS_GROUP environment variable

Displays the group that would be assigned to the next object created from this shell.

Host

-h

uname -n

Displays the machine's host name.

Principal

-p

gethostbyname()

Displays the fully qualified user name or host name of the NIS+ principal who entered the nisdefaults command.

Access Rights

-r

NIS_DEFAULTS environment variable

Displays the access rights that will be assigned to the next object or entry created from this shell. Format: ----rmcdr---r---

Search path

-s

NIS_PATH environment variable

Displays the syntax of the search path, which indicate the domains that NIS+ will search through when looking for information. Displays the value of the NIS_PATH environment variable if it is set.

Time-to-live

-t

NIS_DEFAULTS environment variable

Displays the time-to-live that will be assigned to the next object created from this shell. The default is 12 hours.

All (terse)

-a

 

Displays all seven defaults in terse format.

Verbose

-v

Display specified values in verbose mode.

 

You can use these options to display all default values or any subset of them:

  • To display all values in verbose format, type the nisdefaults command without arguments.

master% nisdefaults
Principal Name : topadmin.doc.com.
Domain Name : doc.com.
Host Name : rootmaster.doc.com.
Group Name : salesboss
Access Rights : ----rmcdr---r---
Time to live : 12:00:00:00:00
Search Path : doc.com.
  • To display all values in terse format, add the -a option.

  • To display a subset of the values, use the appropriate options. The values are displayed in terse mode. For example, to display the rights and search path defaults in terse mode, type:

    rootmaster% nisdefaults -rs
    ----rmcdr---r---
    doc.com.
  • To display a subset of the values in verbose mode, add the -v flag.

Setting Default Security Values

This section describes how to perform tasks related to the nisdefaults command, the NIS_DEFAULTS environment variable, and the -D option. The NIS_DEFAULTS environment variable specifies the following default values:

  • Owner

  • Group

  • Access rights

  • Time-to-live.

The values that you set in the NIS_DEFAULTS environment variable are the default values applied to all NIS+ objects that you create using that shell (unless overridden by using the -D option with the command that creates the object).

You can specify the default values (owner, group, access rights, and time-to-live) specified with the NIS_DEFAULTS environment variable. Once you set the value of NIS_DEFAULTS, every object you create from that shell will acquire those defaults, unless you override them by using the -D option when you invoke a command.

 
 
 
  Previous   Contents   Next