[elbe-devel] [PATCH v2 4/8] schema: switch to hashed password for root
Bastian Germann
bage at linutronix.de
Fri Jun 24 12:12:03 CEST 2022
Am 16.06.22 um 12:10 schrieb Holger Dengler:
> Replace the plain-text password with its hashed variant in the XML
> schema. Adapt the password processing for root accordingly.
>
> Signed-off-by: Holger Dengler <holger at hdengler.de>
Reviewed-by: Bastian Germann <bage at linutronix.de>
> ---
> elbepack/rfs.py | 4 ++--
> schema/dbsfed.xsd | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index 4704eed61..dd12e4f5a 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -325,9 +325,9 @@ class BuildEnv:
>
>
> def seed_etc(self):
> - passwd = self.xml.text("target/passwd")
> + passwd = self.xml.text("target/passwd_hashed")
> stdin = "root:%s" % (passwd)
> - chroot(self.rfs.path, "chpasswd", stdin=stdin)
> + chroot(self.rfs.path, "chpasswd --encrypted", stdin=stdin)
>
> hostname = self.xml.text("target/hostname")
> fqdn = hostname
> diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
> index ed6423854..0cf23e660 100644
> --- a/schema/dbsfed.xsd
> +++ b/schema/dbsfed.xsd
> @@ -982,10 +982,10 @@
> </documentation>
> </annotation>
> </element>
> - <element name="passwd" type="rfs:string" minOccurs="1" maxOccurs="1">
> + <element name="passwd_hashed" type="rfs:string" minOccurs="1" maxOccurs="1">
> <annotation>
> <documentation>
> - root password
> + hashed root password
> </documentation>
> </annotation>
> </element>
More information about the elbe-devel
mailing list