For clients using MS SQL Server, you can schedule a job to extract a user list from the Active Directory to populate OneWorld. The script below creates new user accounts and assigns them to a group that has no rights within OneWorld.
To enable the account, all you have to do is reassign the new account to a user group that has rights within the system.
INSERT INTO jde7334.sys7334.f0092 (ULUSER, ULOUTQ, ULLlVL, ULlSEV, ULLMSG, ULAN8, ULMTVL, ULCMDE, ULUGRP, ULFSTP)
SELECT distinct substring(samaccountname, 1, 10), 'QPRINT', '4', '00', '*NOLIST', 0.0, 'Y', 'Y', 'WBHQDOWN', 'Y'
FROM OPENQUERY( ADSI,
'SELECT samaccountname, distinguishedName
FROM ''LDAP://DC=wbhq,DC=com'' WHERE objectCategory = ''person''')
WHERE (distinguishedName like '%OU=User Accounts%' or distinguishedName like '%CN=Users%') and substring(samaccountname, 1, 10) not in (select ULUSER from jde7334.sys7334.f0092)
insert into jde7334.sys7334.f98owsec
select USERID, SCOWPWD, SCSECFRQ, SCSECLST, SCSECUSR, SCSECPWD, SCSECTPE, SCUGRP, SCSECF1, SCSECF2, SCSECF3, SCSECV1, SCSECV2, SCSECV3, SCSECV4, SCSRVBLOBA, SCATTEMPTS, SCEUSER, SCRETRY, SCMUSE, SCPID, SCJOBN, SCUPMJ, SCUPMT
from (select distinct substring(samaccountname, 1, 10) as USERID from OPENQUERY( ADSI,
'SELECT samaccountname, distinguishedName
FROM ''LDAP://DC=wbhq,DC=com'' WHERE objectCategory = ''person''')
WHERE (distinguishedName like '%OU=User Accounts%' or distinguishedName like '%CN=Users%')) as A
join (select * from jde7334.sys7334.f98owsec where scuser='TEMPLATE') as B
on 1=1
where USERID not in (select SCUSER from jde7334.sys7334.f98owsec)