Solved

how to decrypt a htpasswd encrypted password?

Posted on 1998-01-29
2
34,578 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now