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