select_zone

Use the select_zone command to retrieve a zone from Active Directory, stores the zone in memory, and make that zone as the currently selected zone for subsequent ADEdit commands. The zone remains selected until you select another zone, delete the zone, or end the ADEdit session.

If you use ADEdit commands such as set_zone_field to change settings for the zone, you must save the zone using the save_zone command for your changes to take effect in Active Directory. If you select another zone or end the ADEdit session before saving the currently selected zone, your changes will be lost.

You should note that ADEdit treats computer roles and computer-specific overrides as special use-case zones. You can, therefore, use the select_zone command to retrieve a “computer role zone” or a “computer-specific zone” to work with as the currently selected zone. If you specify a zone that is a computer role zone or a computer-specific zone, subsequent ADEdit commands will treat the zone as a computer role or a computer-specific zone instead of a standard zone. You can only work with one zone at a time, regardless of type. Because some ADEdit commands behave differently in different types of zones, you should verify the type of zone you are working with when you select a zone.

Zone type

Classic and hierarchical

Syntax

select_zone [-nc] path

Abbreviation

slz

Options

This command takes the following option:

Option Description

-nc

Requests a reread of the zone’s fields from Active Directory.

Use this option after you use the save_zone command to ensure you have the current Active Directory field values in memory. For example, after a save_zone command, the modifyTime field value is updated. If you do not then run select_zone -nc, a gzf modifyTime command returns the previous value.

Arguments

This command takes the following argument:

Argument Type Description

path

string

Required. Specifies the path to the selected zone or computer role. The path format depends on the type of zone selected:

  • A tree, classic3, classic4, or SFU zone path consists of the zone’s distinguished name. Enclose the path in braces or quotes to allow spaces in the distinguished name.
  • A computer role path consists of the host zone’s distinguished name followed by a slash (/) and the name of the computer zone. Enclose the path in braces or quotes to allow spaces in the distinguished name.
  • A computer override path consists of the computer name followed by an ampersand (@) and the distinguished name of the host zone.

Return value

This command returns nothing if it runs successfully.

Examples

The following example selects a standard zone named cz1 in the Zones container in the UNIX organizational unit in the acme.com domain:

select_zone "CN=cz1,CN=Zones,OU=UNIX,DC=acme,DC=com”

The following example selects the computer role named LinuxComputers in the global zone in the Zones container in the UNIX organizational unit in the acme.com domain:

select_zone “CN=global,CN=Zones,OU=UNIX,DC=acme,DC=com/LinuxComputers”

The following example selects the computer-specific override zone named server1 in the global zone in the acme.com domain:

select_zone *"server1.acme.com@*CN=global,CN=Zones,OU=Centrify,DC=acme,DC=com”

Related commands

The following commands perform actions related to this command:

  • create_zone creates a new zone in Active Directory.
  • get_zones returns a Tcl list of all zones within a specified domain.

After you have a zone stored in memory, you can use the following commands to work with that zone:

  • delegate_zone_right delegates a zone use right to a specified user or computer.
  • delete_zone deletes the selected zone from Active Directory and memory.
  • get_child_zones returns a Tcl list of child zones, computer roles, or computer zones.
  • get_zone_field reads a field value from the currently selected zone.
  • get_zone_nss_vars returns the NSS substitution variable for the selected zone.
  • save_zone saves the selected zone with its current settings to Active Directory.
  • set_zone_field sets a field value in the currently selected zone.