Gets or sets the parent of the current zone.


IHierarchicalZone Parent {get; set;}

Property value

The parent zone.


Centrify allows a child zone to have no parent, so that you can preload all the child zone profiles and role assignments before assigning the zone to a parent zone. See also the discussion under the IsChild property.

SFU zones cannot be child zones. See Data storage for Centrify zones for information about different zone types.


Parent throws an ApplicationException if you attempt to assign a parent to an SFU zone.


The following code sample illustrates using the Parent property in a script:

IHierarchicalZone objParent =
cims.GetZoneByPath("cn=" + strParentZone + "," + strContainerDN) as IHierarchicalZone;
if (objParent == null)
    Console.WriteLine("Parent zone " + strParentZone + " does not exist.");
    IHierarchicalZone objZone = cims.CreateZone(objContainer, strZone) as 
    // set the starting UID and GID for the zone
    objZone.NextUID = 10000;
    objZone.NextGID = 10000;
    objZone.UseNextUid = true;
    objZone.UseNextGid = true;
    objZone.AvailableShells = new string[] { "/bin/bash", "/bin/shell" };
    objZone.DefaultShell = "%{shell}";
    objZone.DefaultHomeDirectory = "%{home}/%{user}";
    objZone.UserDefaultGecos = "%{u:description}";
    objZone.Parent = objParent;
    objZone.NssVariables.Add("shell", "/bin/bash" );