Can I use NTLM authentication with MS SQL Server on Windows?
Yes, but you will have to modify some configuration settings because defaults are based on SQL authentication. Stop your server and follow the steps below:
- Download latest jTDS driver from here
- Extract from the distribution jtds-xxx.jar and relevant ntlmauth.dll, place them under /conf/dbdrivers on server.
Server JVM will have to load ntlmauth.dll - to allow this add library path property in /conf/lfs.conf file.
It should look like this:
Comment out user name and password in hibernate properties file to ensure that NTLM authentication is used.
Make sure that connection URL specifies correct domain. Here is my example:
- If logFaces server runs as windows service, you will have to make sure that LFS service starts with proper user account and not default system account. Open services control panel and specify logon user credentials to be used by LFS service.
- Otherwise, the jTDS driver will use currently logged in user credentials to connect to your database.
Finally start the service and watch for the internal log, if everything is clean you should see the connection details and driver version.