Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HowTo use Windows Authentication with MSSQL 2008+Delphi 7+ADO but users would still enter their password?

Does anybody know if it's possible to set up MSSQL 2008 to use Windows Authentication but users would still have to enter their windows password to log on (this would have to be accomplished by using Delphi 7+ADO)?

[Edit]: Just to clarify, the sql-server and the clients are all within the same Windows Domain.

[Edit 2]: I don't want to write my own new LoginDialog but rather have SQL Server do that for me or let's say the DBConn control.

Kind Regards, Reinhard

like image 296
pastacool Avatar asked Jun 21 '10 12:06

pastacool


1 Answers

If you really wanted to do this, you could prompt the user to (re-)enter credentials and then verify and handle appropriately based on success/failure. To do this, you are looking for the LogonUser function. At this point, you could even allow a user to log into the database using credentials other than those used to log into the computer by using the ImpersonateLoggedOnUser function. Please see this answer.

like image 198
Scott W Avatar answered Sep 28 '22 04:09

Scott W