![]() |
![]() |
| |||||||||||||||||||||
Displaying the Value of NIS_DEFAULTSYou can check the setting of an environment variable by using the echo command, as shown below:
You can also display a general list of the NIS+ defaults active in the namespace by using the nisdefaults command as described in Displaying NIS+ Defaults--The nisdefaults Command. Changing DefaultsYou can change the default access rights, owner, and group, by changing the value of the NIS_DEFAULTS environment variable. Use the environment command that is appropriate for your shell (setenv for C-shell or $NIS_DEFAULTS=, export for Bourne and Korn shells) with the following arguments:
You can combine two or more arguments into one line separated by colons: -owner=principal-name:-group=group-name Table 15-13 shows some examples: Table 15-13 Changing Defaults--Examples
All objects and entries created from the shell in which you changed the defaults will have the new values you specified. You cannot specify default settings for a table column or entry; the columns and entries simply inherit the defaults of the table. Resetting the Value of NIS_DEFAULTSYou can reset the NIS_DEFAULTS variable to its original values, by typing the name of the variable without arguments, using the format appropriate to your shell: For C shell
For Bourne or Korn shell
Specifying Nondefault Security Values at Creation TimeYou can specify different (that is, nondefault) access rights, owner, and group, any time that you create an NIS+ object or table entry with any of the following NIS+ commands: To specify security values other than the default values, insert the -D option into the syntax of those commands, as described in Specifying Access Rights in Commands. As when setting defaults, you can combine two or more arguments into one line. Remember that column and entry's owner and group are always the same as the table, so you cannot override them. For example, to use the nismkdir command to create a sales.doc.com directory and override the default access right by granting the owner only read rights you would type:
Changing Object and Entry Access RightsThe nischmod command operates on the access rights of an NIS+ object or table entry. It does not operate on the access rights of a table column; for columns, use the nistbladm command with the -D option. For all nischmod operations, you must already have modify rights to the object or entry. Using nischmod to Add RightsTo add rights for an object or entry use: For object
For table entry
For example, to add read and modify rights to the group of the sales.doc.com. directory object you would type:
For example to add read and modify rights to group for the name=abe entry in the hosts.org_dir.doc.com. table you would type:
Using nischmod to Remove RightsTo remove rights for an object or entry use: For object
For entry
For example, to remove create and destroy rights from the group of the sales.doc.com. directory object you would type:
For example to remove destroy rights from group for the name=abe entry in the hosts.org_dir.doc.com. table, you would type:
Specifying Column Access RightsThe nistbladm command performs a variety of operations on NIS+ tables. Most of these tasks are described in The nistbladm Command. However, two of its options, -c and -u, enable you to perform some security-related tasks:
Setting Column Rights When Creating a TableWhen a table is created, its columns are assigned the same rights as the table object. These table level, rights are derived from the NIS_DEFAULTS environment variable, or are specified as part of the command that creates the table. You can also use the nistbladm -c option to specify initial column access rights when creating a table with nistbladm. To use this option you must have create rights to the directory in which you will be creating the table. To set column rights when creating a table use:
Where:
| |||||||||||||||||||||
| |||||||||||||||||||||