473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help with active directory

Hi,

I need to be able to check the logon credentials of a Windows XP
machine, so I can then check these against active directory so that I
can pull off their groups, which can then be checked in my ASP.Net
site to authenticate against certain pages. Is this possible?

Appreciate any help on this
Jul 15 '08 #1
3 1229
"nomad" <d.*******@btinternet.comwrote in message
news:17**********************************@34g2000h sh.googlegroups.com...
I need to be able to check the logon credentials of a Windows XP
machine
Please clarify - you need to be able to check the credentials of a machine,
not a user...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 15 '08 #2
On Jul 15, 8:45*am, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
"nomad" <d.bedg...@btinternet.comwrote in message

news:17**********************************@34g2000h sh.googlegroups.com...
I need to be able to check the logon credentials of a Windows XP
machine

Please clarify - you need to be able to check the credentials of a machine,
not a user...?

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net
Hi Marc,

If I log onto my machine in work (Windows XP) this authenticates with
active directory on our network and then logs me in. I would like to
be able to retrieve my login credentials, so I could then use these as
authentication to log directly onto my ASP.Net site. As my site will
be on another network, I will then need to use these logon credentials
to authenticate with another server so I can then retrieve what groups
they have been placed in so I can limit where they go in the site.

Appreciate your help.
Jul 15 '08 #3
"nomad" <d.*******@btinternet.comwrote in message
news:0d**********************************@k30g2000 hse.googlegroups.com...
I need to be able to check the logon credentials of a Windows XP
machine

Please clarify - you need to be able to check the credentials of a
machine,
not a user...?
If I log onto my machine in work (Windows XP) this authenticates with
active directory on our network and then logs me in. I would like to
be able to retrieve my login credentials, so I could then use these as
authentication to log directly onto my ASP.Net site.
Ah - so it's *your* credentials that you're looking for, not the
machine's... The reason I asked is that machines also have an account in
ActiveDirectory...
As my site will be on another network, I will then need to use these
logon credentials to authenticate with another server so I can then
retrieve what groups they have been placed in so I can limit where
they go in the site.
Understood. This shouldn't be too much of a problem, but you'll need to
supply a bit more information...

1) How are the two networks connected?

2) Do you have the same login (username and password) on both networks...?

3) Once you have been authenticated by AD on the first network, are you
considered to be similarly authenticated on the second network? I.e. is it
OK for the first network to tell the second network who you are?
After all that, retrieving the list of groups to which a user belongs is
fairly straightforward:

public static List<stringGetGroupsForUser(string pstrUser)
{
List<stringlstGroups = new List<string>();

using (DirectorySearcher objDS = new
DirectorySearcher("objectCategory=User"))
{
objDS.Filter = "(SAMAccountName=" + pstrUser + ")";
using (DirectoryEntry objUser = new
DirectoryEntry(objDS.FindOne().Path))
{
PropertyCollection colProperties = objUser.Properties;
PropertyValueCollection colPropertyValues =
colProperties["memberOf"];
foreach (string strGroup in colPropertyValues)
{
lstGroups.Add(GetSAMAccountName(strGroup).ToLower( ));
}
}
}
return lstGroups;
}
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 15 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sara | last post by:
Dear Sir, I want to access to a special group in active directory but with this function I could just see that a special user is exist in active directory or not, I mean I want to see that a user...
9
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
0
by: Henning Kristensen | last post by:
Hi I need a little help with some VB.Net code.. I am pulling my computer's GUID out using WMI Dim wmiObj As New System.Management.ManagementObjectSearcher("SELECT UUID FROM...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
6
by: varkey.mathew | last post by:
Dear all, Bear with me, a poor newbie(atleast in AD).. I have to authenticate a user ID and password for a user as a valid Active Directory user or not. I have created the IsAuthenticated...
0
by: Sara | last post by:
Dear Sir, I want to access to a special group in active directory but with this function I could just see that a special user is exist in active directory or not, I mean I want to see that a user...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
3
by: MuZZy | last post by:
Hi, I'm trying to find a way to call a standard ActiveDirectory search dialog from my C# app, so i can pick a domain or computer user an dreturn it to the app. It's a search like one showing...
11
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package...
0
by: shorti | last post by:
We are running DB2 UDB 8.1 fp 14 on AIX using archival logging and online backups. I was running some disaster tests and found my database restore was not restoring to the latest active log. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.