Package: passwd $ sudo passwd -S root daemon |wc -l 1 Passwd should test that exactly one non-option argument is given, unless -a (or -h?) is given, in which case no non-option arguments are given. If not, set $? -ne 0. passwd -l foo bar returns 0 but hasn't locked bar.