fnos: 将密码应用到 root 账户

fixes https://github.com/bin456789/reinstall/issues/256#issuecomment-2682476928
This commit is contained in:
bin456789
2025-03-02 21:57:06 +08:00
parent a12718e49c
commit bed4294644
2 changed files with 11 additions and 4 deletions

View File

@ -3920,12 +3920,12 @@ install_fnos() {
# 更新 initrd
# chroot $os_dir update-initramfs -u
# 删除自带的 root 密码
# 更改密码
# chroot $os_dir passwd -d root
echo "root:$(get_password_linux_sha512)" | chroot $os_dir chpasswd -e
# ssh root 登录,测试用
if false; then
echo "root:$(get_password_linux_sha512)" | chroot $os_dir chpasswd -e
allow_root_password_login $os_dir
chroot $os_dir systemctl enable ssh
fi