Solved

how to decrypt a htpasswd encrypted password?

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

759 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

17 Experts available now in Live!

Get 1:1 Help Now