diff options
Diffstat (limited to 'usr/bin')
-rw-r--r-- | usr/bin/rmpasswd | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr/bin/rmpasswd b/usr/bin/rmpasswd index d36b8d1..00dd2e7 100644 --- a/usr/bin/rmpasswd +++ b/usr/bin/rmpasswd @@ -1,10 +1,6 @@ #!/bin/bash while read p; do - delim=$(echo $p | tr ":" " ") - read -a arr <<< $delim - if [[ ${arr[1]} == "$"* ]] - then - passwd -d ${arr[0]} - fi -done < /etc/shadow
\ No newline at end of file + read -a arr <<< $p + passwd -d ${arr[0]} +done <<< "$(passwd -Sa |egrep '^[^[:space:]]+[[:space:]]P[[:space:]]')" |