Administers NIS+ tables.
To add or overwrite table entries
nistbladm -a | -A [ -D Defaults ] { Col_name=Value... Tbl_name }
nistbladm -a | -A [ -D Defaults ] { Entry_Name }
To create an table
nistbladm -c [ -D Defaults ] [ -p Path ] [ -s Sep ] Type Col_name=[ S ] [ I ] [ C ] [ B ] [ X ] [ Access ]... Tbl_name
Example
nistbladm -c hobby_tbl name=S,a+r,o+m hobby=S,a+r hobbies.abc.com.
To delete an entire table
nistbladm -d Tbl_name
To edit table entries
nistbladm -m | -E Col_name=Value... Entry_name
To remove table entries
nistbladm -r | -R { [ Col_name=Value... ] Tbl_name }
nistbladm -r | -R { Entry_name }
To update a table's attributes
nistbladm -u [ -p Path ] [ -s Sep ] [ -t Type ] [ Col_name=Access... ] Tbl_name
The nistbladm command is used to administer NIS+ tables. It performs five primary operations: creating tables, deleting tables, adding table entries, modifying table entries, and removing table entries.
Though NIS+ does not restrict the size of tables or entries, the size of data affects the performance and the disk space requirements of the NIS+ server. NIS+ is not designed to store huge amounts of data, such as files. Instead, store pointers to files located on other servers. NIS+ can support up to 10,000 objects totaling 10M bytes. If the you need more storage space, create the domain hierarchy, or use the data stored in the tables as pointers to the actual data, instead of storing the actual data in NIS+.
To create a table, its directory must already exist and you must have create rights to that directory. You must specify a table name, table type, and a list of column definitions. Type is a string that acts as a standard by which NIS+ verifies that entries are of the correct type.
To delete a table, you must have destroy rights to the directory where it is stored. To modify entries, whether adding, changing, or deleting, you must have modify rights to the tables or individual entries.
Item | Description |
---|---|
-a | Adds a new entry to an NIS+ table. Create
the entry's contents by supplying Col_name=Value pairs on the
command line. Note:
With the -a flag, the nistbladm command
reports an error if you attempt to add an entry that would overwrite
a pre-existing value in the desired column. The nistbladm command
does not automatically overwrite pre-existing entry values. (See
the -A flag for information about overwriting entries.)
|
-A | Forces the nistbladm command to overwrite a pre-existing entry value. Even if Col_name already contains a value, nistbladm overwrites the old value with the new value. Unlike with the -a flag, the nistbladm command does not return an error. |
-c Tbl_name | Creates a new NIS+ table
named in the parameter Tbl_name. When creating a table, you
must specify a table type, entry type, and a list of column definitions.
The syntax for column definitions is Col_name=[ Flags ]
[ Access ]. The parameter Flags can have these possible
values:
The newly created table must contain at least one column in number and at least one searchable column; in other words, if Tbl_name only has only one column, that column must be searchable. |
-d Tbl_name | Deletes the entire table indicated in the parameter Tbl_name. The table must be empty before you delete it. (Use the -R flag to delete a table's contents.) |
-D | Specifies a set of defaults to be used when new objects are
created. The defaults string is a series of tokens separated by colons.
These tokens represent the default values to be used for the generic
object properties.
|
-e Entry_name | Edits the entry specified by Entry_name. Entry_name must
uniquely identify only one single entry. While editing the value
of Entry_name, you can also change that entry's indexed name.
Note: If the entry's new indexed name (resulting from the edit) matches
that of another's entry, the nistbladm command fails and returns
an error message.
|
-E Entry_name | Edits the entry specified by Entry_name. Entry_name must
uniquely identify only one single entry. Note: If the new indexed
name matches that of another entry, then the -E flag automatically
overwrites that existing entry with the entry just edited. So, in
effect, two entries are being replaced by one.
|
-m | Same functionality as -E. |
-r | Removes an entry from a table. Either identify the entry by its indexed name in Entry_value, or by a series of Col_name=Value pairs on the command line. With the -r flag, the nistbladm command fails when the indexed name or the column=value pairs match more than one entry. |
-R | Removes multiple entries from a table. The -R flag forces the nistbladm command to remove all entries that match the criterion for removal. If that criterion is null—if you do not specify column=value pairs or an indexed name—then all entries from the table are removed. |
-u | Updates attributes of a table. This allows the concatenation path, separation character, column access rights, and table type string of a table to be changed. Neither the number of columns nor the number of searchable columns can be changed with this flag. |
-p Path | Specifies the table's search path when creating or modifying a table. When you invoke the nis_list function, you can specify the flag FOLLOW_PATH to tell the client library to continue searching tables in Path if the search criteria does not yield any entries. The path consists of an ordered list of table names separated by colons. The names in the path must be fully qualified. |
-s Sep | Specifies the table's separator character when creating or modifying a table. The separator character is used by the niscat command when writing tables to standard output. The purpose of the separator character is to separate column data when the table is in ASCII form. The default value is a <space>. |
-t Type | Specifies the tables's Type string when modifying a table. |
Item | Description |
---|---|
0 | Successful completion. |
1 | An error occurred. |
Item | Description |
---|---|
NIS_DEFAULTS | Contains a defaults string that overrides the NIS+ standard defaults. However, if you specify different values with the -D flag, then those values overrides both the NIS_DEFAULTS variable and the standard defaults. |
NIS_PATH | If Tbl_name is not fully qualified, then setting this variable instructs nistbladm to search each directory specified until the table is found. |
nistbladm -c hobby_tbl name=S,a+r,o+m hobby=S,a+r hobbies.abc.com.
The
column name has read access for all (owner, group, and world)
and modify access for only the owner. The column hobby has
read access for all but cannot be modified by anyone. If access rights are not specified, then the table access rights would be either the standard defaults or those specified by the NIS_DEFAULTS variable.
nistbladm -a name=bob hobby=skiing hobbies.abc.com.
nistbladm -a name=sue hobby=skiing hobbies.abc.com.
nistbladm -a name=ted hobby=swimming hobbies.abc.com.
nistbladm -u -p hobbies.xyz.com.:hobbies.def.com. hobbies
nistbladm -R hobby=skiing hobbies.abc.com.
nistbladm -c notes_tbl_ name=S,a+r,o+m note=notes.abc.com.
This
command string creates the table notes.abc.com. of the type notes_tbl with
the two columns, name and note. The note column
is not searchable.