[elbe-devel] [PATCH v1 04/15] rfs: use hashed password for root

Holger Dengler holger at hdengler.de
Wed Jun 8 22:39:47 CEST 2022


Use the hashed password for setting the root password in the target RFS.

Signed-off-by: Holger Dengler <holger at hdengler.de>
---
 elbepack/rfs.py | 4 ++--
 1 file changed, 2 insertions(+), 2 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
-- 
2.36.1



More information about the elbe-devel mailing list