Commit
Commits the settings or changes for a zone
object to Active Directory.
Syntax
void Commit()
Discussion
This method confirms that the zone name and DirectoryEntry
attributes are
specified before updating Active Directory.
By default, the user who creates the zone object in Active Directory has permission to perform all administrative tasks in the zone. For information about setting and modifying the permissions required to perform specific tasks, see the Planning and Deployment Guide.
Exceptions
Commit
may throw one of the following exceptions:
-
ArgumentException
if the zone name is not valid. -
ApplicationException
if the container is not a valid zone container, the zone name is already in use, or you have insufficient access rights to modify the zone. -
UnauthorizedAccessException
if you have insufficient access rights to commit the data object. -
COMException
if an LDAP error occurred. LDAP errors can occur if the connection to the LDAP server fails, the connection times out, invalidcredentials are presented, or there are other problems communicating with Active Directory.
Example
The following code sample illustrates using this method in a script:
...
'Create a new zone.
set objZone = Cims3.CreateZone(objContainer, strZone)
'set the starting UID and GID for the new zone.
objZone.nextAvailableUID = 10000
objZone.nextAvailableGID = 10000
'set the default shell and home directory the new zone.
objZone.DefaultShell = "/bin/bash"
objZone.DefaultHomeDirectory = "/home/\${user}"
'Finalize the transaction and update Active Directory.
objZone.Commit
...