linux如何知道新密码与旧密码相似?

如果您曾经收到一条消息说您的新密码与旧密码太相似,那么您可能会好奇您的Linux系统是如何“知道”它们太相似的。今天的超级用户问答帖子为好奇的读者提供了一个“魔法帷幕”背后的一瞥。...

linux如何知道新密码与旧密码相似?

如果您曾经收到一条消息说您的新密码与旧密码太相似,那么您可能会好奇您的Linux系统是如何“知道”它们太相似的。今天的超级用户问答帖子为好奇的读者提供了一个“魔法帷幕”背后的一瞥。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

屏幕截图由marc falardeau(Flickr)提供。

问题

超级用户读者LeNoob想知道Linux系统如何“知道”密码彼此太相似:

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?

Linux系统如何“知道”密码彼此太相似?

答案

超级用户贡献者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 distributi***. 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 c***idered 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上通读其余的生动讨论。


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-11 02:06
  • 阅读 ( 149 )
  • 分类:互联网

你可能感兴趣的文章

频繁更改密码对您的安全有好处吗?

... 我相信您不需要我们来告诉您如何创建强密码,但这些信息始终值得重复: ...

  • 发布于 2021-03-11 15:13
  • 阅读 ( 876 )

重置忘记的windows管理员密码的3种方法

...不要担心。有几种方法可以用来恢复它。我们将向您展示如何在Windows中重置管理员密码。 ...

  • 发布于 2021-03-15 03:48
  • 阅读 ( 836 )

在windows xp中重置管理员密码的5个提示

...已经详细介绍了将Linux发行版安装到CD或USB的过程,以及如何重置密码。 ...

  • 发布于 2021-03-22 08:54
  • 阅读 ( 218 )

如何更改unix密码

...安全性时,基于Unix的操作系统提供了强大的功能。但是如何利用这些高级功能来保护您的系统呢? ...

  • 发布于 2021-03-26 19:43
  • 阅读 ( 265 )

如何更改linux密码

...但幸运的是,更改Linux密码很容易。今天我们将向您展示如何通过几个简单的命令更改当前用户的密码、其他用户的密码和超级用户的密码。 ...

  • 发布于 2021-03-28 02:28
  • 阅读 ( 185 )

如何在windows 10中更改wi-fi密码

... 无论您的情况如何,我们都将向您展示如何在Windows10中更改Wi-Fi密码。 ...

  • 发布于 2021-03-28 02:38
  • 阅读 ( 230 )

如何在linux上强制用户更改密码

密码是帐户安全的基石。我们将向您展示如何在Linux网络上重置密码、设置密码过期期限和强制更改密码。 密码已经存在了近60年 自从20世纪60年代中期密码第一次出现以来,我们就一直在向计算机证明我们就是我们所说的那个...

  • 发布于 2021-04-01 09:52
  • 阅读 ( 188 )

如何更改netflix密码

如果有人偷了你的密码,尤其是你的Netflix账号,那就永远都不好了。谢天谢地,流媒体服务使更改密码变得简单。只要您知道当前密码,请按照以下步骤为您的帐户创建新密码。 使用原始密码登录Netflix网站后,选择右上角的头...

  • 发布于 2021-04-02 10:36
  • 阅读 ( 141 )

如何在linux上更改帐户密码

...来,密码一直是帐户安全的基石,比Unix早了近10年。了解如何在Linux中使用命令行或GNOME桌面环境来管理密码。 如何选择强密码 计算机密码是出于需要而产生的。随着多用户分时计算机系统的出现,分离和保护人们数据的重要...

  • 发布于 2021-04-02 22:58
  • 阅读 ( 142 )

如何在chromebook上更改密码

...备上使用Google服务时,系统会提示您使用新密码登录。 如何在chromebook上更改密码 首先打开一个新的Chrome浏览器窗口。 选择右上角的个人资料照片,然后选择谷歌帐户。 选择登录和安全。 向下滚动,直到看到“登录到谷歌...

  • 发布于 2021-04-04 04:51
  • 阅读 ( 143 )
老夫擎天柱
老夫擎天柱

0 篇文章

相关推荐