In my case, using dnn335, the code is something like this:
In Signin.ascx.vb, function WindowsAuthorization line 366:
If user not in dnn database
' Add this user into DNN database for better performance on next logon
objAuthUsers.AddDNNUser(objAuthUser)
Else
' update DNN password to match with authenticated password from AD
UserController.ChangePassword(objUser, objUser.Membership.Password, txtPassword.Text)
So I changed the code to store a random password in dnn database, but started to have this problem with the locked account, as I mentioned earlier. I will take a look on newer versions.