diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-03-31 10:35:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 10:35:17 +0200 |
commit | f9d8325e69da7caf44a395446206a130939d6677 (patch) | |
tree | e40553a952bc3b7ca5b2dd65de724754033e9b75 /units | |
parent | 4c31bfdf55c8065478a0fb1648b15b28d359c0e0 (diff) | |
parent | 9f17a03ae8e3b3b9a0a4fe7470f35a46622627f6 (diff) | |
download | systemd-f9d8325e69da7caf44a395446206a130939d6677.tar.gz |
Merge pull request #18971 from poettering/sysusers-creds
let's read LoadCredentials=/SetCredentials= style cred in sysusers/firstboot and when asking for passwords
Diffstat (limited to 'units')
-rw-r--r-- | units/systemd-firstboot.service | 13 | ||||
-rw-r--r-- | units/systemd-sysusers.service | 7 |
2 files changed, 19 insertions, 1 deletions
diff --git a/units/systemd-firstboot.service b/units/systemd-firstboot.service index 2fea88384f..2e57b064c1 100644 --- a/units/systemd-firstboot.service +++ b/units/systemd-firstboot.service @@ -13,7 +13,7 @@ Documentation=man:systemd-firstboot(1) DefaultDependencies=no Conflicts=shutdown.target After=systemd-remount-fs.service -Before=systemd-sysusers.service sysinit.target first-boot-complete.target shutdown.target +Before=systemd-sysusers.service systemd-vconsole-setup.service sysinit.target first-boot-complete.target shutdown.target Wants=first-boot-complete.target ConditionPathIsReadWrite=/etc ConditionFirstBoot=yes @@ -25,3 +25,14 @@ ExecStart=systemd-firstboot --prompt-locale --prompt-timezone --prompt-root-pass StandardOutput=tty StandardInput=tty StandardError=tty + +# Optionally, pick up basic fields from credentials passed to the service +# manager. This is useful for importing this data from nspawn's +# --set-credential= switch. +LoadCredential=passwd.hashed-password.root +LoadCredential=passwd.plaintext-password.root +LoadCredential=passwd.shell.root +LoadCredential=firstboot.locale +LoadCredential=firstboot.locale-messages +LoadCredential=firstboot.keymap +LoadCredential=firstboot.timezone diff --git a/units/systemd-sysusers.service b/units/systemd-sysusers.service index ff5b3db821..47373307b3 100644 --- a/units/systemd-sysusers.service +++ b/units/systemd-sysusers.service @@ -21,3 +21,10 @@ Type=oneshot RemainAfterExit=yes ExecStart=systemd-sysusers TimeoutSec=90s + +# Optionally, pick up a root password and shell for the root user from a +# credential passed to the service manager. This is useful for importing this +# data from nspawn's --set-credential= switch. +LoadCredential=passwd.hashed-password.root +LoadCredential=passwd.plaintext-password.root +LoadCredential=passwd.shell.root |