From 622f28dfbca93c8df9a2e26719fa831f2d3e91d0 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 12 Mar 2023 21:39:04 +0100 Subject: [PATCH] Add setup root users implementation --- configs/crystal/configure-network/up.nu | 2 +- configs/crystal/setup-root-user/up.nu | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configs/crystal/configure-network/up.nu b/configs/crystal/configure-network/up.nu index a80dd45..ae6c8ed 100644 --- a/configs/crystal/configure-network/up.nu +++ b/configs/crystal/configure-network/up.nu @@ -26,7 +26,7 @@ def main [cfg] { create_hosts if $cfg.ipv6_loopback { - create_ipv6_loopback + create_ipv6_loopback } info "Configured network" diff --git a/configs/crystal/setup-root-user/up.nu b/configs/crystal/setup-root-user/up.nu index 0e5f0da..5de2ab3 100644 --- a/configs/crystal/setup-root-user/up.nu +++ b/configs/crystal/setup-root-user/up.nu @@ -1,6 +1,7 @@ let RUN_IN_CHROOT = true; # Applies all system changes of `setup-root-user` def main [cfg] { - echo "Executing up task `setup-root-user` with config" $cfg - todo "Implement setup-root-user" + debug $"Setting up root password ($cfg)" + run usermod --password $cfg.password root + info "Configured root user" }