English 中文(简体)
chpasswd.cgi-在网络上更改密码不能使用超过8个字符
原标题:chpasswd.cgi - change password on web won t work with more than 8 chars

晚安

我使用chpasswd.cgi通过web更改密码,问题是当我将密码更改为123456789时,它将不起作用。我正在将一个代理服务器迁移到一个新的代理服务器,我有超过2k的密码。

我注意到crypt()将密码限制在8位,我有一些密码超出了这一限制。我试着查看/etc/pam.d/common-password,但我认为这与我想要什么无关。

问题回答

如果您的脚本继承了默认的哈希类型,那么在/etc/login.defs中更改ENCRYPT_METHOD可能会满足您的要求。根据您使用的操作系统发布轨迹,可用的哈希类型可能包括以下内容(现代没有创建选项):

但sha256crypt或sha512crypt可能是“最不坏的”。

对于这两种情况,您还需要在下一个配置部分中增加SHA_CRYPT_MIN_ROUNDSSHA_CRYPT_MAX_ROUNDS[/code>,使其达到用户所能站立的高度(通常在500ms左右,用户会开始注意到)。将这些值保持为一个范围(而不是相同的值)将导致它们获得随机分布的功因子。这是一种理想的对策,可以在所有工作因素相同的情况下(如hashcat)破解效果最好(或仅能工作)的工具。





相关问题
Encrypting SALTEDHASHED weblogic password in java

How to encrypt SALTEDHASHED password (used by Weblogic) in java? I need to be able to hash passwords in exactly the same way as WebLogic s authenticator does. Preferably without using WebLogic s ...

Should I support Unicode in passwords?

I would like to allow my users to use Unicode for their passwords. However I see a lot of sites don t support that (e.g. Gmail, Hotmail). So I m wondering if there s some technical or usability ...

Why does my method return a null password?

I have two classes: a Generator class and a SystemManagement class. The Generator class, I can generate a password. The SystemManagement class imports Generator (from another package) and includes ...

How to mask password in c?

In C, I want to display every single character that the user type as * (Ex, Please type in your password: *****) I m searching around but can t be able to find a solution for this. I m working on ...

MySQL password function

Is it considered good or bad practice to use MySQL s password function to hash passwords used by an application? I can see pros and cons. I m curious if there is a general consensus on whether it is ...

How should I store a user s LDAP password in a cookie?

So I have this black box authentication method, handed down to me from the accounts people, which basically amounts to ldap_bind($connection, $username, $password). But of course, I want my users to ...

Simple JAVA: Password Verifier problem

I have a simple problem that says: A password for xyz corporation is supposed to be 6 characters long and made up of a combination of letters and digits. Write a program fragment to read in a string ...

Password protect a simple web site

I ve got an HTML-only website (with a bit of inconsequential javascript). The static pages are generated from a photo-blogging program that I created. There are hundreds of pages and thousands of ...