summaryrefslogtreecommitdiff
path: root/usr/bin/rmpasswd
blob: d36b8d1a29266212fbaaeadbb67405bece057ca0 (plain)
1
2
3
4
5
6
7
8
9
10
#!/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