修复 curl|bash 模式下 passwd 无法读取键盘输入的问题

This commit is contained in:
2026-03-25 14:34:36 +08:00
parent 2e2ae39d08
commit 74c1175264
+1 -1
View File
@@ -22,7 +22,7 @@ if id "$USERNAME" &> /dev/null; then
else
useradd -m -G wheel -s /bin/bash "$USERNAME"
echo "请设置 $USERNAME 的密码:"
passwd "$USERNAME"
passwd "$USERNAME" < /dev/tty
fi
echo "==> 配置 WSL 默认用户..."