diff options
author | Helmut Grohne <helmutg@debian.org> | 2025-04-11 10:09:15 +0000 |
---|---|---|
committer | Helmut Grohne <helmutg@debian.org> | 2025-04-11 10:09:15 +0000 |
commit | 0ef75afe1fe982df1bacfcddd9c6dc354ad07ea5 (patch) | |
tree | 752201399dc98674c0ee733e80be7f51d3de4c4d /bin | |
parent | 1c6688cb9aeffdf2027003423d0ab792045952a8 (diff) | |
parent | 6d2623d23f8ef22b0bdf77174b164636f887914e (diff) | |
download | debvm-0ef75afe1fe982df1bacfcddd9c6dc354ad07ea5.tar.gz |
Merge branch 'skip-autologin-rootpw' into 'main'
debvm-create: --skip=autologin also covers deletion of the root password
See merge request helmutg/debvm!50
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/debvm-create | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/bin/debvm-create b/bin/debvm-create index f6cd90a..78e86bf 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -68,10 +68,11 @@ The following tasks may be skipped. =item B<autologin> -Skips adding a the customize-autologin.sh to B<mmdebstrap> that configures -automatic root login on a serial console and also parses the C<TERM> kernel -cmdline and passes it as C<TERM> to B<agetty>. -This is specific to using B<finit>, B<runit>, B<systemd> or B<sysv> as init system. +Do not setup the machine for automatic password-less root login on the console. +This comprises the following changes that would normally be performed. +Automatic root login is configured for the init systems B<finit>, B<runit>, B<systemd> and B<sysv>. +Forwarding of the C<TERM> kernel command line to B<agetty> is configured. +The root password is deleted such that a login does not ask for it and the system directly boots to a shell prompt. =item B<ext4> @@ -356,9 +357,6 @@ set -- \ "--customize-hook=printf '$ETC_HOSTS_TEMPLATE' '$VMNAME' >"'"$1/etc/hosts"' \ "$@" -# allow password-less root login -set -- "--customize-hook=$SHARE_DIR/customize-delete-rootpw.sh" "$@" - if test "$INITSYSTEM" = systemd && ! check_skip systemdnetwork; then # dhcp on all network interfaces, and add a dns resolver set -- \ @@ -403,7 +401,8 @@ fi if ! check_skip autologin; then set -- \ --include=login \ - "--customize-hook=$SHARE_DIR/customize-autologin.sh" "$@" + "--customize-hook=$SHARE_DIR/customize-autologin.sh" \ + "--customize-hook=$SHARE_DIR/customize-delete-rootpw.sh" "$@" fi if test "$(id -u)" = 0; then |