View Single Post
Old 13th March 2008, 09:57   #1
Junior Member
Join Date: Mar 2008
Posts: 2
AccessControl: Setting permissions to "Domain Users" without knowing the domain name


I want to be able to set write permissions on a file to the "Domain Users" account, but without knowing the domain name in advance (or even that I'm in a domain at all).

I've seen in the AccessControl plugin documentation that I could use the SID (S-1-5-domain-513), but I still would need to know the domain the current user is logged onto. Is there an easy way to do that?

I found in another thread about a system call to LookupAccountSid which would also return the domain name, but I need the current user SID to do that and I don't know how to get it either.
uteseg is offline   Reply With Quote