|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Naming and Directory Services (NIS+)|
An NIS+ table must have at least one column and at least one of its columns must be searchable. To create an NIS+ table, use the nistbladm command with the -c option:
nistbladm -c tabletype columnspec \ ... tablename
Tabletype is simply a name that identifies a class of tables to which this table belongs. You can use any name you choose.
A columnspec specifies the name and characteristics of each column in a new table. Enter one columnspec for each column you want in your new table. Separate the columnspecs with spaces, as shown in the following example.
nistbladm -c tabletype columnspec columnspec \ columnspec tablename
Columnspec formats are described in Specifying NIS+ Table Columns, below.
Each columnspec entry has two to four components in the format:
Table 19-3 NIS+ Table Column Components
A column can be one of the following types.
Table 19-4 NIS+ Table Column Types
NIS+ commands search through the column and identify individual table rows based on the contents of the searchable columns. Searchable columns are designated with either the S or the I option. In database terminology, a searchable column is a key. The first column in each table must be searchable. The remaining columns do not have to be searchable. Because the table is keyed on the searchable columns, if you have more than one searchable column, they must be the first and subsequent columns and not skip any columns. For example, if only one column in a table is searchable, it has to be the first column. If two columns are searchable, they must be the first two columns. (See nistbladm, Searchable NIS+ Columns, Keys, and Column Values for more information on searchable columns.)
If you specify only access rights, you don't need to use a comma. If you include one or more of the -S, -I, or -C flags, add a comma before the access rights.
In the example below, a table is created with the addition of column-specific access rights applied to the first two columns:
master% nistbladm -c depts Name=I,w+m Site=w+m Name=C \ divs.mydir.doc.com.
For more information about specifying column access rights when creating a table, see Setting Column Rights When Creating an NIS+ Table.
If you are creating an automount table, the table can have only two columns. The first column must be named key and the second column must be named value. For example, to create an automount table named auto1, you would enter:
master% nistbladm -c key-value key=S value= auto1.org_dir.doc.com.