TQsoft-GmbH / mod_authn_ntlm

Apache 2.4 SSPI NTLM based authentication module for windows
Other
85 stars 27 forks source link

authentication with virtualhost doesn't work #52

Open armal opened 4 years ago

armal commented 4 years ago

I found that authentication with virtualhost name different than regular hostname doesn't work.

Example: hostname: digit1.ggg.com username given: ggg\mark password correct and it works

but when we define virtualhost like virtu1.ggg.com and setup this same authentication rules it won't work.

log says:

[Fri Jul 17 14:24:27.493294 2020] [auth_ntlm:debug] [pid 33688:tid 2120] mod_ntlm_authentication.c(632): [client 192.168.84.48:56538] SSPI00001: Entering authenticate_sspi_user()
[Fri Jul 17 14:24:27.493294 2020] [auth_ntlm:error] [pid 33688:tid 2120] (OS 1326)Nazwa użytkownika lub hasło sš niepoprawne.  : [client 192.168.84.48:56538] authentication failure for "/": user unknown
[Fri Jul 17 14:24:27.493294 2020] [auth_ntlm:debug] [pid 33688:tid 2120] mod_ntlm_authentication.c(535): SSPI: Testing for IE bug, request GET (null)
[Fri Jul 17 14:24:27.493294 2020] [core:trace3] [pid 33688:tid 2120] request.c(117): [client 192.168.84.48:56538] auth phase 'check user' gave status 401: /

Is it possible to make this work?

JBlond commented 4 years ago

The error message says: The username or password is incorrect

armal commented 4 years ago

Yes but the password and username are surely correct. I tried several times

neongrau commented 4 years ago

Are you using the domain name either with "domain\user" or "user@domain"? Or just plain user name?

Make sure to use the one the windows domain is using not the VirtualHost name.

armal commented 4 years ago

I've tried domain\user, just user and even user@domain Nothing works 🙁

YvesR commented 3 years ago

If you authenticate against FQDN, are you sure your window server is setup properly? BackConnectionHostNames registry key in windows hold valid domains and has to be set.