add_map_entry

Use the add_map_entry command to add an entry to the currently selected NIS map stored in memory. This command does not support a comment field. If you want to add a comment along with the entry use add_map_entry_with_comment instead.

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.

The add_map_entry 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 key value

Abbreviation

ame

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.

Return value

This command returns nothing if it runs successfully.

Example

add_map_entry Finance “Hank@acme.com,Sue@acme.com”

This example adds the NIS map entry Finance with the value Hank@acme.com,Sue@acme.com to the currently selected NIS map.

Related commands

The following commands enable you to view and select the NIS map you want to work with:

  • get_nis_maps returns a Tcl list of NIS maps in the currently selected zone.
  • list_nis_maps lists to stdout of all NIS maps in the currently selected zone.
  • new_nis_map creates a new NIS map and stores it in memory.
  • select_nis_map retrieves a NIS map from Active Directory and stores it in memory.

After you have a NIS map stored in memory, you can use additional commands to work with that map’s entries or use the following commands to delete or save the currently selected NIS map:

  • delete_nis_map deletes the selected NIS map from Active Directory and from memory.
  • save_nis_map saves the selected NIS map with its current entries to Active Directory.