Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

Enum local user accounts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mircea Pleteriu - 07 Jul 2005 12:18 GMT
Hi

Is it possible to enumerate the local user accounts by means of classes in System.DirectoryServices namespace?
My OS is Windows XP Professional.

Thanks,
      Mircea
"Peter Huang" [MSFT] - 08 Jul 2005 03:18 GMT
Hi Mircea,

Here is a link, you may have a try to see if that is what you wanted.
Retrieve User Lists in .NET
Find out how to retrieve a list of users and groups in .NET.
http://doc.advisor.com/Articles.nsf/nl/16771

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Mircea Pleteriu - 08 Jul 2005 07:11 GMT
Hi Peter,

I need a way to list the built-in local user accounts.

I am able to list the following types of user accounts: domain user
accounts, built-in domain user accounts, local user accounts.
But I am not able to list the built-in local user accounts.

It works with WMI but I have to accomplish that with Active Directory.

> Hi Mircea,
>
[quoted text clipped - 10 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
Willy Denoyette [MVP] - 08 Jul 2005 17:14 GMT
Local accounts are not domain accounts, as such they are not registered in
the AD and you can't use LDAP as provider.
You can use the DirectoryServices namespace classes with the "WinNT"
provider to access the local SAM.
Check:
... DirectoryEntry("WinNT://....
in MSDN.

Willy.

> Hi Peter,
>
[quoted text clipped - 21 lines]
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
"Peter Huang" [MSFT] - 09 Jul 2005 03:54 GMT
Hi

I agree with Willy's suggestion, also here is a link for your reference.
Enumerating local accounts with WMI
http://www.pcreview.co.uk/forums/thread-531890.php

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.