1

I would like to know if it is possible from sql directly to check a username and a password in Active directory. I mean without CLR functions.

I know is possible to get the list of users using Openrowset from a linked server and I was thinking if I can somehow put the password as a "where" parameter to that query and check the number of returned rows.

Thank you

mslliviu
  • 1,098
  • 2
  • 12
  • 30
  • I know how to do it directly in C#, I hoped there was also a SQL version... Can you make your comment an answer? – mslliviu Feb 22 '12 at 07:08

1 Answers1

1

No, you cannot.

The user's password in Windows is not available in clear text anywhere, so you cannot just compare it in a WHERE clause....

See how to do it very easily in C# in my answer to this SO question - but you can't do it inside SQL Server

Community
  • 1
  • 1
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459