From debf06d43f58ee6716d9fceaadb5348ba88a6814 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 9 Feb 2025 22:20:51 +0800 Subject: [PATCH] =?UTF-8?q?opensuse:=20=E4=BF=AE=E5=A4=8D=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=86=85=E6=A0=B8=E6=97=B6=E6=8A=A5=20Failed=20to=20g?= =?UTF-8?q?et=20root=20password=20hash=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trans.sh b/trans.sh index ec59961..6e97c46 100644 --- a/trans.sh +++ b/trans.sh @@ -3033,11 +3033,11 @@ EOF kernel='kernel-default' fi - # 必须设置一个密码,否则报错 + # x86 必须设置一个密码,否则报错,arm 没有这个问题 # Failed to get root password hash # Failed to import /etc/uefi/certs/76B6A6A0.crt # warning: %post(kernel-default-5.14.21-150500.55.83.1.x86_64) scriptlet failed, exit status 255 - if grep -q ^root:: $os_dir/etc/shadow; then + if grep -q '^root:[:!*]' $os_dir/etc/shadow; then echo "root:$(mkpasswd '')" | chroot $os_dir chpasswd -e chroot $os_dir zypper install -y $kernel chroot $os_dir passwd -d root