LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use active directory to validate users?

I figured it out myself. I simple followed the instructions given by "dkentner".

0 Kudos
Message 11 of 19
(2,786 Views)

I know this thread is pretty old, but here is an easy way to validate active directory user's credentials (username and password combination). This VI is .NET System.DirectoryServices.AccountManagement (3.5.0.0)

 

Actually I found the information as PowerShell script here. It should run on Windows 2000 and later.

 

validate_AD_user_credentials.png

 

Message 12 of 19
(2,695 Views)

I am trying to retrieve the windows local user groups that the current windows user is a member of using the  EXP-AD-4003-Testad-010.vi and UsersGroups.vi provided under this thread.

When I type my username and password I am receiving the error 1172 as seen in the attachment on the `directory searcher find one` invoke node.

Could anyone tell me how the syntax should be like to stop receiving the error on the probed wire in the attached jpg?

Thanks in advance.

Download All
0 Kudos
Message 13 of 19
(2,598 Views)

sezergin,

The syntax I am using matches your... for example mine is (sAMAccountName=dkentn). I did notice that I'll get the error you are seeing if I am disconnected from the network or ther is no Windows Server (active directory) on the network. 

 

Dennis

0 Kudos
Message 14 of 19
(2,535 Views)

I can also reproduce the exact same error when the network is disconnected or the user-ID is an empty string. I guess sezergin is trying to get access to the users and groups defined on the local Windows machine, not to Active Directory users and groups.

 

This is something I like to know also 🙂 If someone has already VI for it, please share it with us.

 

Nick

0 Kudos
Message 15 of 19
(2,516 Views)

I know that this thread is old, but you can also use the ActiveDS Type Library to authenticate users.

 

LDAP_Auth.png

Message 16 of 19
(2,388 Views)

I would bet that OpenDSObject returns an object refnum in the variant. Not closing that as well will result in a memory leak until the application is shutdown. No problem if you only validate once every so often but a total no go for an application that would stay active all the time and validate users repeatedly.

Rolf Kalbermatter
My Blog
0 Kudos
Message 17 of 19
(2,368 Views)

Your probably right. I hadn't considered that for this example. I haven't used the Active DS library in quite some time, and I am sure you can expose other groups, users, computers, etc.

0 Kudos
Message 18 of 19
(2,361 Views)

This post was awesome. Just what I needed to authenticate a windows user!

0 Kudos
Message 19 of 19
(2,127 Views)