AddAccessRule to Directory for Usergroups of another Domain
-
Well, I'm working on a software which should give rights for usergroups to a directory that is on a fileshare. The usergroup is handled in a domain on a foreign ad-server I can create groups on this ad-server. I can read rights of the fileshare. I can set rights to local groups or groups of my own ad-server But I can't give rights to groups of this other ad-server with his own domains. When I try there comes the error, that he don't know the group. I tried to get the SecurityIdentifier and another error occurs: it says that it's not possible to translate the account. I've tried it that way:
NTAccount account = new NTAccount("domain\\group");
SecurityIdentifier secId = (SecurityIdentifier)account.Translate(typeof(SecurityIdentifier));This works for group of my own domain (or ad-server) but not for the foreign. Has anyone an idea what to do? By, the way, I tried to change the Thread-User, what seems to work, but no difference:
string[] roles = { "managers", "executives" };
Thread.CurrentPrincipal = new GenericPrincipal(new GenericIdentity(user, pwd), roles);------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.