Commit
Commits changes to the user profile object and saves the changes in Active Directory.
Syntax
void Commit()
Discussion
If you are creating a new UNIX profile or updating a user’s primary group or other attributes, you must use this method to complete the operation. If you have marked an object for deletion, this method deletes the object from Active Directory.
Exceptions
Commit
may throw one of the following exceptions:
-
UnauthorizedAccessException
if your permissions are not sufficient to commit the Active Directory data object. -
COMException
if an LDAP error occurs. 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 Commit
in a script:
...
'Get the zone object
Set objZone = cims.GetZone("ajax.org/UNIX/Zones/pilot")
'Get the Active Directory user object
set objUser = cims.GetUser("ajax.org/Users/pat.hu")
'Set the UNIX profile for the user
set profile = objUser.SetUnixProfile(objZone, 10001, "pat", "/bin/bash",
"/home/pat", 10001)
'Validate the user’s UNIX profile
profile.Validate
profile.Commit
...