#!/bin/sh
# SPDX-License-Identifier: MIT
# Copyright (C) 2026 pake <pake@fedora.tw> - https://pomelo-os.org
# chpasswd shim: lines  user:password  on stdin (root; the Settings page runs it through pkexec)
rc=0; while IFS= read -r l; do u=${l%%:*}; p=${l#*:}; printf "%s\n" "$p" | pomelo-accounts passwd "$u" || rc=1; done; exit $rc
