Kā Linux zina, ka jauna parole ir līdzīga vecai?

Satura rādītājs:

Kā Linux zina, ka jauna parole ir līdzīga vecai?
Kā Linux zina, ka jauna parole ir līdzīga vecai?

Video: Kā Linux zina, ka jauna parole ir līdzīga vecai?

Video: Kā Linux zina, ka jauna parole ir līdzīga vecai?
Video: Should You Buy or Rent Your Modem? - YouTube 2024, Aprīlis
Anonim
Ja jūs kādreiz esat saņēmuši ziņojumu, ka jūsu jaunā parole ir pārāk līdzīga jūsu vecajam, tad jums var būt interesanti, kā jūsu Linux sistēma "zina", ka tās ir pārāk daudzas. Šodienas SuperUser Q & A ziņa nodrošina pēkuli aiz "burvju aizkaru", kas notiek, lai ziņkārīgs lasītājs.
Ja jūs kādreiz esat saņēmuši ziņojumu, ka jūsu jaunā parole ir pārāk līdzīga jūsu vecajam, tad jums var būt interesanti, kā jūsu Linux sistēma "zina", ka tās ir pārāk daudzas. Šodienas SuperUser Q & A ziņa nodrošina pēkuli aiz "burvju aizkaru", kas notiek, lai ziņkārīgs lasītājs.

Šodienas jautājumu un atbilžu sesija mums priecājas par SuperUser - Stack Exchange dalību, kas ir kopienas vadīta Q & A tīmekļa vietņu grupa.

Ekrānuzņēmums pieklājīgi no marc falardeau (Flickr).

Jautājums

SuperUser lasītājs LeNoob vēlas uzzināt, kā Linux sistēma "zina", ka paroles ir pārāk līdzīgas viena otrai:

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?

Kā Linux sistēma "zina", ka paroles ir pārāk līdzīgas viena otrai?

Atbilde

SuperUser ieguldītājs slhck ir atbilde mums:

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.

Pārliecinieties, ka esat izlasījis pārējās dzīvās diskusijas SuperUser tīklā, izmantojot tēmu pavedienu, kas ir saistīts zemāk.

Vai kaut ko pievienot paskaidrojumam? Skatieties komentāros. Vēlaties lasīt citas atbildes no citiem tehnoloģiju savvy Stack Exchange lietotājiem? Šeit skatiet pilnu diskusiju pavedienu.

Ieteicams: