Clear-text Passwords In Web Sites

Paw Prints: Writings of the maddog
Recently I had forgotten what password I had used for a web site, and I politely asked them to reset the password so I could log in and change it. Instead the site sent me my old password, in clear-text through email.
After I got over the shock of seeing the current password in my email I went onto the site and changed the password to a not-very-flattering noun which had something to do with a combination of excrement and the flabby pieces of nerve endings in the website manager's collective craniums. Then I proceeded to make sure there was nothing on that site of any value. I did consider just deleting the account, but I was curious as to how this site operated and how it would play out.
Interestingly enough, this site sends out a “reminder” email every month, and puts the user's password in that email as clear-text. I guess their clientèle forgets their passwords a lot, but I am about to tell the web-master (in polite terms) that this is an unsafe practice.
I was astonished that anyone would store a password as clear-text, and even more astonished that someone would send that password through email.
Unix, of course, has had encrypted passwords for a very long time. More than just encrypting the password, part of the encrypted password is thrown away, so you can not de-encrypt the stored string to discover the password. Each time a person logs in, the encryption algorithm is applied, the encrypted string is truncated to the same length as the stored string and the two strings are compared to see if they are equal. If they are, the user is given access to the system.
The password file in Unix and Linux was (and still is) readable by anyone, and storing the encrypted password in the /etc/passwd file allowed someone to try and break the password by “brute force”, usually by encrypting all the words in the dictionary plus some key phrases and then comparing those encrypted words with the encrypted passwords in the password file. People who make their passwords a single word, or their birthday, or a common name are vulnerable. It would have been better to make the file /etc/passwd only readable by “root”, but by the time that realization occurred it was too late. Too many programs were reading the /etc/password file directly, and taking away the ability to access the passwd file completely would break those programs.
After a while the password field was moved to a “shadow” password file, the shadow only readable by “root”, and all of the other fields in /etc/passwd stayed the same with the exception of the /etc/passwd file having an “x” in the place of the encrypted string. Since the programs that looked at the passwd file typically did nothing with the encrypted password itself, most programs that used the passwd file did not notice that the contents of the password field was simply changed to an “x”.
There is nothing which stops a web site from using the same type of technologies and ideas for maintaining their own password mechanisms, yet we continue to hear about sites that are compromised and thousands of passwords are stolen, leading to identity theft.
I know I am preaching to the choir, but if one webmaster who participates in a site that stores clear-text passwords sees this and stops the practice, it will be worthwhile.
Carpe Diem!
Comments
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

News
-
First Release Candidate for Linux Kernel 6.14 Now Available
Linus Torvalds has officially released the first release candidate for kernel 6.14 and it includes over 500,000 lines of modified code, making for a small release.
-
System76 Refreshes Meerkat Mini PC
If you're looking for a small form factor PC powered by Linux, System76 has exactly what you need in the Meerkat mini PC.
-
Gnome 48 Alpha Ready for Testing
The latest Gnome desktop alpha is now available with plenty of new features and improvements.
-
Wine 10 Includes Plenty to Excite Users
With its latest release, Wine has the usual crop of bug fixes and improvements, along with some exciting new features.
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
clear text passwds
I too have had this occur to myself.