SQL password field

Posted on 2013-10-20
Medium Priority
Last Modified: 2013-10-20
I inherited a website for a client after their developer bailed & disappeared. The site is in ASP.NET using an MS SQL database. The client does not remember the password to their admin area. I can access the database through the web host control panel. I can see the login username & password fields, but the password is encrypted.

How do I set a new password? Plain text doesn't work obviously. I assume I need to encrypt it, but how?
Question by:techbots
  • 3
LVL 34

Expert Comment

by:Brian Crowe
ID: 39586254
Log into the server with SQL Server installed and then from the command line run ssms using psexec.  This will log you into SSMS AS NTAuthority user which automatically has sysadmin rights on the sql instance.  At that point you can change any passwords you need including sa.  This assumes you have admin rights on the server.

PsExec -s -i "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"


Author Comment

ID: 39586423
I don't believe I have that kind of access. This is hosted on godaddy.  I can log onto the database. What I need is to change a password field within a table of the database.

Author Comment

ID: 39586442
Is there a simple way to just encrypt a word and copy and paste it into the field?

Accepted Solution

Randy Knight, MCM earned 1500 total points
ID: 39586506
You would need to know how the application is encrypting / decrypting the password.  Do you have access to the ASP.NET code?  If you can see what they are doing to encrypt the password, you should be able to encrypt a clear text password using the same method, then update the password field in the database with the hash.

Author Closing Comment

ID: 39586848
I hunted through all the ASP.NET code and found where the password was being encrypted but had no idea how to encrypt a new one so I just changed the code for just a second so I could log in with a plain text password. Not ideal, but worked enough for me to do what I needed.

Thanks for pointing me in the right direction - I won't bother you with asking further instructions since I found a temporary work-around. I learned I need to learn a lot more about ASP.NET & SQL Server!

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this article, we will show how to detach and attach a database and then show how to repair a corrupt database and attach it, If it has some errors. We will show how to detach and attach using SSMS or using T-SQL sentences.
In this article, we will see two different methods to recover deleted data. The first option will be using the transaction log to identify the operation and restore it in a specified section of the transaction log. The second option is simpler and c…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

627 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