JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Naming and Directory Services (NIS+)
search filter icon
search icon

Document Information

Preface

Part I About Naming and Directory Services

1.  Name Service Switch

Part II NIS+ Setup and Configuration

2.  NIS+: An Introduction

3.  NIS+ Setup Scripts

4.  Configuring NIS+ With Scripts

5.  Setting Up the NIS+ Root Domain

6.  Configuring NIS+ Clients

7.  Configuring NIS+ Servers

8.  Configuring an NIS+ Non-Root Domain

9.  Setting Up NIS+ Tables

Part III NIS+ Administration

10.  NIS+ Tables and Information

11.  NIS+ Security Overview

12.  Administering NIS+ Credentials

13.  Administering NIS+ Keys

14.  Administering Enhanced NIS+ Security Credentials

15.  Administering NIS+ Access Rights

16.  Administering NIS+ Passwords

17.  Administering NIS+ Groups

18.  Administering NIS+ Directories

19.  Administering NIS+ Tables

NIS+ Table Administration

Using the nistbladm Command With NIS+ Tables

nistbladm Syntax Summary

nistbladm and NIS+ Column Values

nistbladm, Searchable NIS+ Columns, Keys, and Column Values

nistbladm and Indexed NIS+ Names

nistbladm and NIS+ Groups

Creating a New NIS+ Table

Specifying NIS+ Table Columns

Creating Additional NIS+ Automount Tables

Deleting an NIS+ Table

Adding Entries to an NIS+ Table

Adding an NIS+ Table Entry With the -a Option

Adding an NIS+ Table Entry With the -A Option

Modifying NIS+ Table Entries

Editing an NIS+ Table Entry With the -e Option

Editing an NIS+ Table Entry With the -E Option

Removing NIS+ Table Entries

Removing NIS+ Single Table Entries

Removing Multiple Entries From an NIS+ Table

niscat Command

niscat Command Syntax

Displaying the Contents of an NIS+ Table

Displaying the Object Properties of an NIS+ Table or Entry

nismatch and nisgrep Commands

About Regular Expressions in NIS+

nismatch and nisgrep Command Syntax

Searching the First Column in NIS+

Searching a Particular Column in NIS+

Searching Multiple Columns in NIS+

nisln Command

nisln Command Syntax

Creating a Link in NIS+

nissetup Command

Expanding a Directory Into an NIS+ Domain

Expanding a Directory Into an NIS-Compatible Domain

nisaddent Command

nisaddent Command Syntax

Loading Information Into NIS+ From a File

Loading Data From an NIS Map Into NIS+

Dumping the Contents of an NIS+ Table to a File

20.  NIS+ Server Use Customization

21.  NIS+ Backup and Restore

22.  Removing NIS+

23.  Information in NIS+ Tables

24.  NIS+ Troubleshooting

A.  NIS+ Error Messages

About NIS+ Error Messages

Common NIS+ Namespace Error Messages

B.  Updates to NIS+ During the Solaris 10 Release

Solaris 10 and NIS+

Glossary

Index

Using the nistbladm Command With NIS+ Tables


Note - Some NIS+ table administration tasks can be performed more easily with Solaris Management Console tools if you have them available.


The nistbladm command is the primary NIS+ table administration command. The nistbladm command is for use on NIS+ tables stored in an NIS+ directory object. With it, you can create, modify, and delete NIS+ tables and entries. To create a table, its directory must already exist. To add entries to the table, the table and columns must already be defined.

To create a table, you must have create rights to the directory under which you will create it. To delete a table, you must have destroy rights to the directory. To modify the contents of a table, whether to add, change, or delete entries, you must have modify rights to the table or the entries.

nistbladm Syntax Summary

The general syntax of the nistbladm command is:

nistbladm options \
 [columspec | columnvalue] \
 [tablename | indexedname]

Where:

Table 19-1 nistbladm Options

Option
Description
-a | -A
Add an entry to an existing NIS+ table. The -a option returns an error if execution of the command would result in overwritting any existing entry. The -A option forces execution of the command even if it results in overwriting an existing entry. (See Adding Entries to an NIS+ Table.)
-D defaults
Specify a different set of default properties when creating an object. (See the nistbladm man page for details.)
-d
Destroy a table. (See Deleting an NIS+ Table.)
-c
Create a table. (See Creating a New NIS+ Table.)
-r | -R
Remove one or more entries from an existing NIS+ table. The -r option returns an error if execution of the command would result in removal of more than one entry. The -R option forces execution of the command even if it results in removing multiple entries. (See Removing NIS+ Table Entries.)
-m
An obsoleted option for modifying table entries that is still supported for backwards compatibility. The -e and -E options are the preferred method for editing entries.
-e | -E
Edit an entry in an existing NIS+ table. The -e option returns an error if execution of the command would affect more than one entry. The -A option forces execution of the command even if it results in changing an existing entry in such a way as to overwrite a different entry. (See Modifying NIS+ Table Entries.)

nistbladm and NIS+ Column Values

Column values are used to identify individual entries in tables using the format:

columname="value", \
 columnname="value", ...

Where:

For example, suppose you had a hosts table that listed machine names and IP addresses.

Table 19-2 Example NIS+ Hosts Table

IP address
name
aliases
172.22.168.4
altair
172.22.168.119
deneb
mail
172.22.168.120
regulus
dnsmaster
172.22.168.121
regulus
dnsmaster
172.22.168.11
sirius

In this example, your could identify the altair entry (row) in three different ways using the column=value of:

But notice in the table above that the machine regulus is multi-homed and has two IP addresses. In that case, the column=value of host=regulus identifies two rows.

To identify just the first regulus row, you would enter either:


Note - Some nistbladm operations require that you enter a column=value pair for every column in the table.


nistbladm, Searchable NIS+ Columns, Keys, and Column Values

When an NIS+ table is created, one or more columns are designated searchable with either the S or the I flags as described in Specifying NIS+ Table Columns. You can use the niscat -o tablename command to display a list of a table's columns and their characteristics.

A table is keyed on its searchable columns. This means that each row in the table must have a unique combination of values in the searchable columns. For example, if a table has one searchable column, each table row must have a unique value in that column, no two rows can contain the same value.

For example, suppose you had a table containing one searchable column named city and a non-searchable column named country. The following rows would all be permitted:

City
Country
San Francisco
United States
Santa Fe
United States
Santiago
Chile

But you could not have two rows like:

City
Country
London
Canada
London
England

If a table has multiple searchable columns, it is the combination of values that must be unique. For example, suppose you had a table containing two searchable columns, Lastname, Firstname and a non-searchable column named city. The following rows would all be permitted:

Lastname
Firstname
City
Kuznetsov
Sergei
Odessa
Kuznetsov
Rima
Odessa
Sergei
Alex
Odessa

But you could not have two rows like this:

Lastname
Firstname
City
Kuznetsov
Rima
Odessa
Kuznetsov
Rima
Chelm

NIS+ commands use the values in the searchable columns to identify specific table rows.

nistbladm and Indexed NIS+ Names

In the context of table administration, an NIS+ indexed name is a name that combines a table name with column value search criteria to identify and select particular entries in a table. Indexed names use the format:

[search_criteria],tablename.directory

Note that search_criteria must be enclosed in square brackets [ ]. The search_criteria use the format:

columname=value, \
 columname=value,...

Where columname=value pairs are column values from the table's searchable columns as described in nistbladm and NIS+ Column Values.

For example, to identify the altair entry in Table 19-2 you could use the indexed name:

[addr=172.22.168.4,cname=altair],hosts.org_dir.doc.com.

The nistbladm -R command allows you to remove all the entries in a table by using the two square brackets with nothing between them [ ] as a wildcard specifying all table rows.

nistbladm and NIS+ Groups

In a Solaris-NIS+ environment, there are three types of groups:


Note - Do not use nistbladm to administer NIS+ groups.


(See Solaris Groups and NIS+ Groups for more information on the different types of groups and how to work with them.)