default, no root password for alpine-* install

This commit is contained in:
tteckster 2023-03-25 06:12:45 -04:00 committed by GitHub
parent 35f5b8413d
commit 6829e1121d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 22 additions and 5 deletions

View file

@ -114,3 +114,15 @@ motd_ssh() {
$STD /etc/init.d/sshd start
fi
}
customize() {
msg_info "Customizing Container"
bash -c "/etc/init.d/syslog stop;rc-update del syslog boot;passwd -d root" >/dev/null 2>&1
msg_ok "Customized Container"
}
root() {
if ! getent shadow root | grep -q '^root:[^:]*:\?\$'; then
customize
fi
}