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 staffto 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_mapsreturns a Tcl list of NIS maps in the current zone.list_nis_mapslists tostdoutthe NIS maps in the current zone.new_nis_mapcreates a new NIS map.select_nis_mapretrieves a NIS map from Active Directory.
The following commands enable you to work with a currently selected NIS map:
add_map_entryadds an entry to the NIS map.delete_map_entryremoves an entry from the NIS map.get_nis_map_fieldreads a field value from the NIS map.get_nis_mapandget_nis_map_with_commentreturn a Tcl list of NIS map entries.list_nis_mapandlist_nis_map_with_commentlists NIS map entries tostdout.