आज का प्रश्न और उत्तर सत्र हमारे पास सुपरयूसर की सौजन्य है - स्टैक एक्सचेंज का एक उपविभाग, क्यू एंड ए वेब साइट्स का एक समुदाय संचालित समूह।
मार्क फाल्डर्डो (फ़्लिकर) की स्क्रीनशॉट सौजन्य।
प्रश्न
सुपर यूज़र रीडर LeNoob जानना चाहता है कि कैसे एक लिनक्स सिस्टम 'जानता है' कि पासवर्ड एक दूसरे के समान हैं:
I tried to change a user password on various Linux machines a few times and when the new password was much like the old one, the operating system said that they were too similar.
I have always wondered, how does the operating system know this? I thought passwords were saved as a hash. Does this mean that when the system is able to compare the new password for similarity to the old one that it is actually saved as plain text?
एक लिनक्स सिस्टम 'पता' कैसे करता है कि पासवर्ड एक दूसरे के समान हैं?
उत्तर
SuperUser योगदानकर्ता slhck हमारे लिए जवाब है:
Since you need to supply both the old and new passwords when using passwd, they can be easily compared in plain text.
Your password is indeed hashed when it is finally stored, but until that happens, the tool where you are entering your password can just access it directly.
This is a feature of the PAM system which is used in the background of the passwd tool. PAM is used by modern Linux distributions. More specifically, pam_cracklib is a module for PAM that allows it to reject passwords based on similarities and weaknesses.
It is not just passwords which are too similar that can be considered insecure. The source code has various examples of what can be checked, such as whether a password is a palindrome or what the edit distance is between two words. The idea is to make passwords more resistant against dictionary attacks.
See the pam_cracklib manpage for more information.
नीचे दिए गए विषय धागे के माध्यम से SuperUser पर शेष जीवंत चर्चा के माध्यम से पढ़ना सुनिश्चित करें।
स्पष्टीकरण में जोड़ने के लिए कुछ है? टिप्पणियों में विचार व्यक्त करो। अन्य तकनीक-समझदार स्टैक एक्सचेंज उपयोगकर्ताओं से अधिक उत्तरों पढ़ना चाहते हैं? यहां पूर्ण चर्चा धागा देखें।