Validate

Checks whether the user profile contains valid data and can be committed to Active Directory.

Syntax

void Validate()

Discussion

This method checks for errors in the UNIX profile fields and verifies that the profile includes a valid primary group, user name, UID, home directory, shell, and zone type. The method also verifies that the entry is not a duplicate of any existing profile in the zone. The method does not perform any of these checks, however, if the user profile is marked for deletion or if the profile has not been modified.

Exceptions

Validate throws an ApplicationException if the UNIX profile is missing data or contains invalid data.

Example

The following code sample illustrates using Validate 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
...