Solved

how to decrypt a htpasswd encrypted password?

Posted on 1998-01-29
2
35,207 Views
Last Modified: 2013-12-25
Does anybody have a script in perl to decrypt the password?
Need it to autosend lost passwords to the user.

Thanks!
0
Comment
Question by:falco
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 100 total points
ID: 1831886
The theory goes that the password encryption is a one-way process. By this I mean that it is not computationally feasible to decrypt it.

The way that this works is that when a user enters a password, it is encrypted and compared with the encrypted version in the file.
The user is only allowed in if the two encrypted versions match.

There is no way to recover a lost password, the only option is to issue a new temporary password to the user, the encrypted version of the new password replaces the old. The user should then change his/her own password so that only they know it.

Only a brute force method can be used to find out the contents of a password file, for example by encrypting a dictionary file and comparing the encrypted version against each password. This will only work if the user has used a dictionary word as a password, hence the recommendation to use both characters and numbers in a password. Such programs however run for days and days and cannot be guaranteed to decrypt all carefully chosen passwords. Besides, this is not what you want to do is it? ;-)

0
 

Expert Comment

by:joseph4
ID: 1831887
short answer: no.

try cheating: at the same time you write the login and encrypted password to your htpassword file, write the login and unencrypted password to a hidden file accesable only to you for future reference.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

840 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