diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-07-22 10:28:15 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-07-22 10:28:15 +0300 |
commit | 65132fa24573261b503a2d5e896aa395b96aaf17 (patch) | |
tree | 82c946b78329d544c38a00782d04a67f6fa896e2 | |
parent | cd22b0d033a96188ef494ee3c8784659cd7ba62e (diff) | |
download | v-i-65132fa24573261b503a2d5e896aa395b96aaf17.tar.gz |
feat: allow removing root password
This allows user to log in from console. SSH is configured to not
allow login with password in any case.
Sponsored-by: author
-rw-r--r-- | std.yml | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -14,6 +14,12 @@ - name: "lock root password" shell: | passwd -l root + when: passwordless_root is not defined or not passwordless_root + + - name: "remove root password" + shell: | + sed -i '/^root:[^:]*:/s//root::/' /etc/passwd + when: passwordless_root - name: "create ~root/.ssh" when: user_pub is defined @@ -134,3 +140,5 @@ user_keyboard_model: pc105 user_keyboard_layout: fi user_console_codeset: Lat15 + + passwordless_root: false |