Solved

SQL Server Express Triggers to Compare hashed passwords before updating user passwords

Posted on 2014-11-25
4
122 Views
Last Modified: 2015-01-12
I recently asked a question where i need to develop a way to compare the last 5 passwords for a user before they update their password in a SQL database prior to the password being changed.  I asked this using the .Net engine http://www.experts-exchange.com/Database/MS-SQL-Server/Q_28553621.html and seem to not be making it very far.

It made me think that this has to be a common issue that maybe i'm not looking at it the right way.  Is there a way to use SQL Server Triggers or procedures to compare the hashed passwords.   For example, I have a PasswordHistory table in the database that stores the history of the hashed password which are copies of the hashed password in the aspnet_Membership table for the users.  I imagine that you could create a temporary table that the password that is suggested is first inserted and then if it is a comparison reject the update of the membership table.  

I have no real idea how to write SQL Triggers or Procedures so I am reaching out to you all to see if there is an answer.  I've been working on this issue for 6 months and intensely the last three weeks.  Thank you in advance.
0
Comment
Question by:atljarman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40466483
Why do you need to reinvent the wheel? Just enforce the password policy in the SQL Server for the logins you want
SQLPasswordPolicy.PNGand then in the Local Security Policy (Start > Control Panel > Administrative Tools > Local Security Policy) adjust the policies as you need:
LocalPasswordPolicy.PNG
0
 

Author Comment

by:atljarman
ID: 40466503
Ok.  So the user names and passwords are stored in tables that are accessed and updated by .net.  I think that is different than sql server logon user and passwords.  I think your recpmmendation is kob th latter, correct?  Thank you for trying to help.
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40466509
Aren't SQL Server logins?
0
 

Author Comment

by:atljarman
ID: 40545716
These are ASP .Net Membership SQL Server database passwords - This was solved on another question but will award points even though it was answering a different question.   I don't think I was asking the right question.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question