我尝试了几种在 SL 6.5 上生成加密密码的不同方法,但似乎对我没有任何作用。我在各种 /var/log/anaconda* 文件中的任何地方都没有发现任何错误,但我无法登录,因此它显然无法正常工作。
/root/anaconda-ks.cfg我用作模板的原始自动创建文件如下所示:
rootpw --iscrypted $6$...(about 100 characters)
authconfig --enableshadow --passalgo=sha512
Run Code Online (Sandbox Code Playgroud)
接下来我尝试了openssl passwd -1这给了我:
rootpw --iscrypted $1$...(about 30 characters)
authconfig --enableshadow --passalgo=sha512
Run Code Online (Sandbox Code Playgroud)
我意识到这不是 SHA-512,所以我尝试了一个 Python one-liner 我发现在几个地方重复:
rootpw --iscrypted $6...(about 10 characters)
authconfig --enableshadow --passalgo=sha512
Run Code Online (Sandbox Code Playgroud)
没有任何效果;我无法登录,最终不得不在单用户模式下重置 root 密码。