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 / ASP.NET / Security / September 2005

Tip: Looking for answers? Try searching our database.

Access level needed to look up username

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sqlboy2000 - 15 Sep 2005 15:30 GMT
Hi all,
I'm currently using the following call to look up a user's windows Full Name
from the domain controller:

       Dim strFilter = "(&(sAMAccountname=" & strUser &
")(objectClass=user))"
       Dim objEntry As New DirectoryEntry("LDAP://myDC", "user", "password")
       Dim search As New DirectorySearcher(objEntry)
       search.Filter = strFilter
       Dim result As DirectoryEntry = search.FindOne.GetDirectoryEntry
       Label1.Text = result.Properties("displayName").Value

This works fine, but my question is what are the minimum rights the user
account would need to look this value up? Do you need to be a domain admin to
access the user object and look up the Full Name?

I'm trying to set up an account with the least rights possible to lookup a
Full Name.

Thanks.
Joe Kaplan (MVP - ADSI) - 16 Sep 2005 18:36 GMT
This depends on the security settings on your AD, but in general a normal
domain user will be able to read displayName on most users.

I'd also recommend specifying AuthenticationTypes.Secure on your DE
constructor and suggest reading the displayName the SearchResult directly
rather than getting the DE via GetDirectoryEntry.  It will be faster (fewer
round trips).  You need to add "displayName" to PropertiesToLoad to have it
be in the SearchResult.

HTH,

Joe K.

> Hi all,
> I'm currently using the following call to look up a user's windows Full
[quoted text clipped - 19 lines]
>
> Thanks.
sqlboy2000 - 21 Sep 2005 21:55 GMT
Thanks for the info.

> This depends on the security settings on your AD, but in general a normal
> domain user will be able to read displayName on most users.
[quoted text clipped - 32 lines]
> >
> > Thanks.

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.