Ask a Question related to ASP.NET Security, Design and Development.
-
poi #1
Global Group Enum From Local ?
I have the code below that successfully gives all of the entries in a
local group. But if an entry is a global group, then those users are
not enumerated. How should I modify the code to dig into any global
groups as well?
Thanks.
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.DirectoryServices;
using ActiveDs;
.....
public string GroupMembers( string userId )
{
string returnVal = "!Default";
string locPath = "WinNT://" +
System.Environment.GetEnvironmentVariable("COMPUTE RNAME");
DirectoryEntry localGroup;
localGroup = new DirectoryEntry( locPath + "/LocalGroupTest,group" );
object allMembers = localGroup.Invoke("Members");
foreach (object groupMember in (IEnumerable)allMembers)
{
DirectoryEntry memberEntry = new DirectoryEntry(groupMember);
returnVal += memberEntry.Name + " : ";
}
return returnVal;
}
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
poi Guest
-
getting the global time ... and the region of local comp
Guys I got a flash exe ... it shows the 4 different time of different countries ... London Dubai Sidney Mumbai now I am in india ..(that is in... -
Determine Global Group vs User in Local?
This code enumerates all local group members (Win2K web server member server in a Win2K domain). But if a member is a global group, I need to... -
vaiables global and local
How do you declare a var global versus local? It seems variables a local and not static as in shell. That is, the sub does not see the vars from... -
Local group authorization
I'm trying to do some role-base authorization in web.config with groups that exist on the server machine but not in the domain which the server is a... -
Adding user to Local Group Administrator
When trying to add a user to the local group administrators, I do not see the domain name in the locations field. I only see the local computer...



Reply With Quote

