core: 支持修改密码

This commit is contained in:
bin456789
2024-10-13 22:58:12 +08:00
parent 0a6b5ba41c
commit 34d6c0a2c1
9 changed files with 273 additions and 88 deletions

View File

@ -25,8 +25,9 @@ d-i mirror/country string manual
# B.4.5. 帐号设置
d-i passwd/make-user boolean false
d-i passwd/root-password password 123@@@
d-i passwd/root-password-again password 123@@@
# 单纯为了跳过设置,实际上是在 partman/early_command 里设置密码preseed/early_command 无法设置密码
d-i passwd/root-password password ''
d-i passwd/root-password-again password ''
# kali 需要下面这行,否则会提示输入用户名
d-i passwd/root-login boolean true
@ -155,6 +156,8 @@ d-i partman/early_command string true; \
[ -d /sys/firmware/efi ] && debconf-set partman-auto/expert_recipe "$(debconf-get partman-auto/expert_recipe_efi)"; \
[ -d /sys/firmware/efi ] || debconf-set partman-auto/expert_recipe "$(debconf-get partman-auto/expert_recipe_bios)"; \
debconf-set passwd/root-password-crypted "$(cat /configs/password-linux-sha512)"; \
true >/bin/os-prober
# kali ssh 默认关闭