3 Commits

Author SHA1 Message Date
Sovran_Systems 5084d6ebb8 Merge pull request #213 from naturallaw777/copilot/remove-chroot-chpasswd-block
[WIP] Remove chroot/chpasswd block from installer script
2026-04-12 18:10:37 -05:00
copilot-swe-agent[bot] b610e76659 Fix chpasswd: remove broken chroot from installer, defer to first-boot service
Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/e55c1e70-0958-4d77-a222-52dccc9459b2

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
2026-04-12 23:10:19 +00:00
copilot-swe-agent[bot] 3fd000ac4e Initial plan 2026-04-12 23:08:49 +00:00
2 changed files with 2 additions and 17 deletions
-15
View File
@@ -1017,21 +1017,6 @@ class InstallerWindow(Adw.ApplicationWindow):
raise RuntimeError(proc.stderr.strip() or "Failed to write root-password")
run(["sudo", "chmod", "600", "/mnt/var/lib/secrets/root-password"])
proc = subprocess.run(
["sudo", "chroot", "/mnt", "/run/current-system/sw/bin/chpasswd"],
input=f"free:{self.free_password}\nroot:{root_password}",
capture_output=True, text=True
)
if proc.returncode != 0:
proc = subprocess.run(
["sudo", "chroot", "/mnt", "chpasswd"],
input=f"free:{self.free_password}\nroot:{root_password}",
capture_output=True, text=True
)
if proc.returncode != 0:
log(proc.stderr)
raise RuntimeError(proc.stderr.strip() or "Failed to set passwords via chpasswd")
GLib.idle_add(self.push_complete)
# ── Complete ───────────────────────────────────────────────────────────
+2 -2
View File
@@ -107,10 +107,10 @@ in
W3=''${WORD_ARRAY[$((RANDOM % COUNT))]}
DIGIT=$((RANDOM % 10))
ROOT_PASS="$W1-$W2-$W3-$DIGIT"
echo "root:$ROOT_PASS" | chpasswd
echo "$ROOT_PASS" > "$SECRET_FILE"
chmod 600 "$SECRET_FILE"
fi
echo "root:$(cat "$SECRET_FILE")" | chpasswd
'';
};
@@ -144,10 +144,10 @@ in
W3=''${WORD_ARRAY[$((RANDOM % COUNT))]}
DIGIT=$((RANDOM % 10))
FREE_PASS="$W1-$W2-$W3-$DIGIT"
echo "free:$FREE_PASS" | chpasswd
echo "$FREE_PASS" > "$SECRET_FILE"
chmod 600 "$SECRET_FILE"
fi
echo "free:$(cat "$SECRET_FILE")" | chpasswd
'';
};