DNN.ActiveDirectory icon indicating copy to clipboard operation
DNN.ActiveDirectory copied to clipboard

Cannot login - error when creating DNN user?

Open roman-yagodin opened this issue 5 years ago • 3 comments

Describe the bug

It seems like AD provider successfully connects to AD, gets user information, but fails to create user in DNN. My wild guess - due to random password doesn't match the required parameters?

Software Versions

  • DNN: 08.00.04
  • Module: 07.00.00

To Reproduce

Steps to reproduce the behavior:

  1. Install and configure the AD provider
  2. Enable it via site extensions
  3. Try to login with existing AD account credentials

Error log

Log entries with Debug mode enabled:

  1. Description:@GETUSER:Getting ready to getUserEntryByName. LoggedOnUserName: DOMAIN\test_user
  2. Description:@GETUSER:Successfully retrieved user entry by name. Username: DOMAIN\test_user ...
  3. Login Failure
  4. Description:@CREATEUSER:Dumping create status: CreateStatus: InvalidPassword
  5. Description:@GETUSER:Successfully filled objAuthUser object. objAuthUser object JSON: ...

Additional context

From web.config:

<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SiteSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
requiresUniqueEmail="false"
passwordFormat="Hashed"
applicationName="DotNetNuke"
description="Stores and retrieves membership data from the local Microsoft SQL Server database" />

roman-yagodin avatar Nov 16 '20 08:11 roman-yagodin

I have confirmed that the random password created in this module is all numeric. Requiring non alpha characters will trigger an issue. Random password code should be refactored to add upper and lower case letters in case these are required.

sawest avatar Jan 26 '21 15:01 sawest

Can the DNN UserContoller.GeneratePassword() be used for this?

roman-yagodin avatar Jan 27 '21 08:01 roman-yagodin

That is a great idea. I will look and see if it can be.

sawest avatar Jan 27 '21 14:01 sawest