add_map_entry_with_comment
Use the add_map_entry_with_comment
command to add an entry to the currently selected NIS map stored in memory and lets you include a comment. The comment can be up to 2048 characters and does not support new line syntax.
To change an existing entry in a NIS map, use delete_map_entry
to remove the entry, then add the revised version using add_map_entry_with_comment
.
The add_map_entry_with_comment
command changes the NIS map in memory and in Active Directory. You do not need to save the NIS map for the added entry to take effect in Active Directory.
Zone type
Not applicable
Syntax
add_map_entry_with_comment key value comment
Abbreviation
amewc
Options
This command takes no options.
Arguments
This command takes the following arguments:
Argument | Type | Description |
key |
string |
Required. Specifies the key of the NIS map entry. |
value |
string |
Required. Specifies the value of the NIS map entry. |
comment |
string |
Required. Specifies the comment for the NIS map entry. |
Return value
This command returns nothing if it runs successfully.
Example
add_map_entry_with_comment Finance “Hank@acme.com,Sue@acme.com” “new Finance staff”
This example adds the NIS map entry Finance
, with the value Hank@acme.com,Sue@acme.com
and comment new Finance staff
to the currently selected NIS map.
Related commands
Before you use this command, you must have a currently selected NIS map stored in memory. The following commands enable you to view and select a NIS map to work with:
- get_nis_maps returns a Tcl list of NIS maps in the current zone.
- list_nis_maps lists to
stdout
the NIS maps in the current zone. - new_nis_map creates a new NIS map.
- select_nis_map retrieves a NIS map from Active Directory.
The following commands enable you to work with a currently selected NIS map:
- add_map_entry adds an entry to the NIS map.
- delete_map_entry removes an entry from the NIS map.
- get_nis_map_field reads a field value from the NIS map.
- get_nis_map and get_nis_map_with_comment return a Tcl list of NIS map entries.
- list_nis_map and list_nis_map_with_comment lists NIS map entries to
stdout
.