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
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
clear text passwds
I too have had this occur to myself.