We currently store users of our web application in our database, along with hashes/salts of their passwords. The hashes are calculated when the user is created and sets their password and stored in a User table in a database.
Some time after the creation of the user account, we may want to create a windows account in our domain, and want to be able to set the domain user's password so that it's the same as the one the user uses to log into the web app. Since we don't save the plain text version of the password, we don't have a way to send it to AD when we created it.
One way I was thinking about getting around this issue, would be to calculate all the different password hashes that AD uses when the user first sets their password, and then somehow set the records in AD later when we create the user.
It seems like there should be a way to do this, since MS has tools for sync'ing passwords from AD to Azure users.
Trying to keep an AD password synchronized with a DB password is a bad idea for two reasons:
Instead of creating a windows account with the same password, alter your web application's authentication to use both AD authentication and Windows Forms authentication. That way, their AD credentials (if they have them) will superseded the username/password prompt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With