Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
A) dsSetProperty(sObjectPath,'userAccountControl','1') before the dsSetOgj line will consistently return the 1068 error
B) Omitting the dsSetProperty(sObjectPath,'userAccountControl','1') line will continue to create the account, but naturally it is disabled.
C) If I put the dsSetProperty(sObjectPath,'userAccountControl','1') line after the dsSetObj line then I get the 1068 message with information stating that the account already exists and is active (which it is not).
I'm lost...
The full function looks like this:
#DefineFunction CreateBOSUserObject(Domain,sAdsiPath,sUserName,sSamName) dsSetCredent('%Domain%\svcscript','pword') ; Legacy username call sObjectClass = 'user' sObjectPath = dsCreateObj(sAdsipath, sObjectClass, sUserName) sProperty = 'samAccountName' dsSetProperty(sObjectPath, sProperty, sSamName) dsSetObj(sObjectPath) dsSetProperty(sObjectPath,'userAccountControl','1') ; The user's account is enabled. Return #EndFunction The parameters passed are: Domain = OurDomainName sAdsiPath = LDAP://OurDomainName/OU=Users,OU=Building,DC=DomainName sUserName = CN=bblahhh sSamName = bblahhh
The wwwbatch.ini contents is:
[ADSI Extender] ErrorCode=1325 ErrorText=0000052D: SvcErr: DSID-031A0FBC, problem 5003 (WILL_NOT_PERFORM), data 0 Provider=LDAP ProviderAny help resolving this would be greatly appreciated.
UF_ACCOUNTDISABLE = 1 nValue = dsGetProperty( sObjectPath, "userAccountControl") nValue = nValue | UF_ACCOUNTDISABLE dsSetProperty(sObjectPath, "userAccountControl", nValue)There may be an additional cause of your problem but I would definitely change your script to work like the above.
If you've implemented a password policy, the account has to have a password that meets the policy before it's enabled. (You can create the account, but not enable it). To fix this problem we simply moved the DsSetPassword routine to happen before the activation of the account. Kapoof, problem solved.
Article ID: W16312
File Created: 2005:02:18:12:19:46
Last Updated: 2005:02:18:12:19:46