Comment 1 for bug 1854594

Revision history for this message
Mina Galić (minagalic) wrote : Re: lock passwd doesn't work on non-GNU passwd

i think i misinterpreted the failure here…
I got a password prompt for root, and assumed it came from a `passwd -l root` call, but the same could be easily true of the equally wrong implementation we have here:

    def lock_passwd(self, name):
        try:
            util.subp(['pw', 'usermod', name, '-h', '-'])
        except Exception as e:
            util.logexc(LOG, "Failed to lock user %s", name)
            raise e

this means, modify this user, read input from the FD supplied after -h, in this case, stdin.