WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

ForeignSecurityPrincipals Issue

 Keywords: AD ADSI ACtive Directory COM Automation dsGetMemGrp 

Question:

In AD, with the GUI I can place foreign users (other domain) in a local group. If I do a dsGetMemGrp I get the folowing list:
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=pv
What 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?

Answer:

It would be helpful to know what errors your are getting but I see that your trusted domains are not part of the same forest so you are working with the equivalent of a down level trust.

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")

User Reply:

Ok, found it.Get the objectSID of the user, and then
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