Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: AD ADSI ACtive Directory COM Automation dsGetMemGrp
LDAP://CN=S-1-5-21-682930604-2610426473-3901748451-1442,CN=ForeignSecurityPrincipals,DC=cumae,DC=pv LDAP://CN=S-1-5-21-682930604-2610426473-3901748451-2094,CN=ForeignSecurityPrincipals,DC=cumae,DC=pv LDAP://CN=lmdoornbos,CN=Users,DC=cumae,DC=pv LDAP://CN=Cumae_user,CN=Users,DC=cumae,DC=pvWhat happens is that when you add a foreign user to a group with the GUI, an object in the ForeignSecurityPrincipals container is created. With the objectSID I can find the user.
With this SID form, which can be constructed, I am able to remove and add again a user to a group with WinBatch.
But when I try this with a user which I did not add manually before, dsAddToGrp fails. Meaning that there is no entry in the ForeignSecurityPrincipals container.
So, I tried to create such an object, but did not succeed.
Can you please help ?
I found this...
"I think you can get AD to create the FSP for you automatically by simply adding the member to the group using the SID DN syntax. This would look like something like: groupEntry.Properties["member"].Add(""); groupEntry.CommitChanges();"How to do this with WinBatch?
Unfortunately, the extender performs an existence check on users before in adds them to a group and I don't think it is able to find the user in this case. The only time the extender does not do this check is when you use a user's SID path and you apparently don't known that in advance.
I would try using the AD COM Automation interfaces to add the foreign user to the group. The follow does not show a foreign user but it should simply be a matter of substituting the correct LDAP paths
objGroup = GetObject("LDAP://shamrock/CN=Domain Local Group,OU=Test OU,DC=jclass,DC=org") objGroup.Add("LDAP://shamrock/CN=Homer Simpson,CN=Users,DC=jclass,DC=org")
objectADSIpath = "LDAP://<SID=S-1-5-xxxxxxxx>"
Article ID: W17528
Filename: ForeignSecurityPrincipals Issue.txt
File Created: 2010:04:22:09:10:44
Last Updated: 2010:04:22:09:10:44