diff options
author | Patrick Murphy <pmurphy@dotnet.multitech.net> | 2020-05-18 15:29:18 -0500 |
---|---|---|
committer | Patrick Murphy <pmurphy@dotnet.multitech.net> | 2020-05-18 15:29:18 -0500 |
commit | c84568b86b0a459d704c5e317b25d6f62f18fbf1 (patch) | |
tree | 270568d33a203609e3ad53214a4c7a92e924e6f0 | |
parent | f31ad9fa875dff07795ac3d4ccc32cfda6243ea2 (diff) | |
parent | d8c750c0968173444ac5c16af9ec8f1f7996935c (diff) | |
download | commissioning-c84568b86b0a459d704c5e317b25d6f62f18fbf1.tar.gz commissioning-c84568b86b0a459d704c5e317b25d6f62f18fbf1.tar.bz2 commissioning-c84568b86b0a459d704c5e317b25d6f62f18fbf1.zip |
Merge remote-tracking branch 'remotes/gitlab/master'
-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:]]')" |