From bed4294644e78f92626af61db67adf4be220f79d Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 2 Mar 2025 21:57:06 +0800 Subject: [PATCH] =?UTF-8?q?fnos:=20=E5=B0=86=E5=AF=86=E7=A0=81=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=88=B0=20root=20=E8=B4=A6=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes https://github.com/bin456789/reinstall/issues/256#issuecomment-2682476928 --- reinstall.sh | 11 +++++++++-- trans.sh | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 0a488a7..6537ddb 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -3794,7 +3794,7 @@ fi # 密码 if ! is_netboot_xyz && [ -z "$password" ]; then - if is_use_dd || [ "$distro" = fnos ]; then + if is_use_dd; then echo " This password is only used for SSH access to view logs during the installation. Password of the image will NOT modify. @@ -4249,8 +4249,15 @@ elif is_alpine_live; then elif is_use_dd; then echo 'Reboot to start DD.' elif [ "$distro" = fnos ]; then + echo "Special note for FNOS:" echo "Reboot to start the installation." - echo "After install, you need to config the system on http://SERVER_IP:5666 as soon as possible." + echo "SSH login is disabled when installation completed." + echo "You need to config the account and password on http://SERVER_IP:5666 as soon as possible." + echo + echo "飞牛 OS 注意事项:" + echo "重启后开始安装。" + echo "安装完成后不支持 SSH 登录。" + echo "你需要尽快在 http://SERVER_IP:5666 配置账号密码。" else echo "Reboot to start the installation." fi diff --git a/trans.sh b/trans.sh index aba565d..e6ad6da 100644 --- a/trans.sh +++ b/trans.sh @@ -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