469,576 Members | 1,694 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,576 developers. It's quick & easy.

Getting list of user groups

Hello!

I need to get the user groups in a machine, because i need to verify
dynamically what's the name of the group "Everyone" in different windows. For
example, in windows in portuguese the name of the user group "Everyone" is
"Todos", so i need to know what's the name of this user group.
Someone have an example of how can I do this??

I'm looking at a System.DirectoryServices namespace, but i didn't get
anything.

Thanks!
Mar 29 '06 #1
4 1826
try this example
http://msdn.microsoft.com/library/de...and_groups.asp

--
Regards

John Timney
Microsoft MVP

"Cleyton" <Cl*****@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
Hello!

I need to get the user groups in a machine, because i need to verify
dynamically what's the name of the group "Everyone" in different windows.
For
example, in windows in portuguese the name of the user group "Everyone" is
"Todos", so i need to know what's the name of this user group.
Someone have an example of how can I do this??

I'm looking at a System.DirectoryServices namespace, but i didn't get
anything.

Thanks!

Mar 29 '06 #2
Hi!

Thanks for your answer... But I didnĀ“t get to make it work..

I think that the problem is in:

strPath = "LDAP://localhost:389/OU=TestOU,O=Fabrikam,C=US";
objADAM = new DirectoryEntry(strPath);

I changed the string strPath to:
strPath = "WinNT://" + Environment.MachineName + ",computer";
..... but didn't works. And I try with LDAP too...but didn't works.

I get the message:The provider does not support searching and cannot search
WinNT:MyPC,computer.

I'm using a win app and i'm in a Workgroup. What's happening??!

Thanks!!
"John Timney ( MVP )" wrote:
try this example
http://msdn.microsoft.com/library/de...and_groups.asp

--
Regards

John Timney
Microsoft MVP

"Cleyton" <Cl*****@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
Hello!

I need to get the user groups in a machine, because i need to verify
dynamically what's the name of the group "Everyone" in different windows.
For
example, in windows in portuguese the name of the user group "Everyone" is
"Todos", so i need to know what's the name of this user group.
Someone have an example of how can I do this??

I'm looking at a System.DirectoryServices namespace, but i didn't get
anything.

Thanks!


Mar 30 '06 #3
It might just be a permissions problem, why dont you post the question in
the microsoft.public.general.adsi group and see if someone can help. There
are MVP's there who are a lot more specialised in AD stuff than I am.
--
Regards

John Timney
Microsoft MVP

"Cleyton" <Cl*****@discussions.microsoft.com> wrote in message
news:D3**********************************@microsof t.com...
Hi!

Thanks for your answer... But I didn“t get to make it work..

I think that the problem is in:

strPath = "LDAP://localhost:389/OU=TestOU,O=Fabrikam,C=US";
objADAM = new DirectoryEntry(strPath);

I changed the string strPath to:
strPath = "WinNT://" + Environment.MachineName + ",computer";
.... but didn't works. And I try with LDAP too...but didn't works.

I get the message:The provider does not support searching and cannot
search
WinNT:MyPC,computer.

I'm using a win app and i'm in a Workgroup. What's happening??!

Thanks!!
"John Timney ( MVP )" wrote:
try this example
http://msdn.microsoft.com/library/de...and_groups.asp

--
Regards

John Timney
Microsoft MVP

"Cleyton" <Cl*****@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
> Hello!
>
> I need to get the user groups in a machine, because i need to verify
> dynamically what's the name of the group "Everyone" in different
> windows.
> For
> example, in windows in portuguese the name of the user group "Everyone"
> is
> "Todos", so i need to know what's the name of this user group.
>
>
> Someone have an example of how can I do this??
>
> I'm looking at a System.DirectoryServices namespace, but i didn't get
> anything.
>
> Thanks!


Mar 30 '06 #4
Thanks! I'll

"John Timney ( MVP )" wrote:
It might just be a permissions problem, why dont you post the question in
the microsoft.public.general.adsi group and see if someone can help. There
are MVP's there who are a lot more specialised in AD stuff than I am.
--
Regards

John Timney
Microsoft MVP

"Cleyton" <Cl*****@discussions.microsoft.com> wrote in message
news:D3**********************************@microsof t.com...
Hi!

Thanks for your answer... But I didnĀ“t get to make it work..

I think that the problem is in:

strPath = "LDAP://localhost:389/OU=TestOU,O=Fabrikam,C=US";
objADAM = new DirectoryEntry(strPath);

I changed the string strPath to:
strPath = "WinNT://" + Environment.MachineName + ",computer";
.... but didn't works. And I try with LDAP too...but didn't works.

I get the message:The provider does not support searching and cannot
search
WinNT:MyPC,computer.

I'm using a win app and i'm in a Workgroup. What's happening??!

Thanks!!
"John Timney ( MVP )" wrote:
try this example
http://msdn.microsoft.com/library/de...and_groups.asp

--
Regards

John Timney
Microsoft MVP

"Cleyton" <Cl*****@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
> Hello!
>
> I need to get the user groups in a machine, because i need to verify
> dynamically what's the name of the group "Everyone" in different
> windows.
> For
> example, in windows in portuguese the name of the user group "Everyone"
> is
> "Todos", so i need to know what's the name of this user group.
>
>
> Someone have an example of how can I do this??
>
> I'm looking at a System.DirectoryServices namespace, but i didn't get
> anything.
>
> Thanks!


Mar 30 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by BobTheDatabaseBoy | last post: by
2 posts views Thread by Brian Henry | last post: by
4 posts views Thread by Mark | last post: by
10 posts views Thread by Jeff Williams | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.