summaryrefslogtreecommitdiff
path: root/usr/bin/rmpasswd
diff options
context:
space:
mode:
authorPatrick Murphy <Patrick.Murphy@multitech.com>2020-05-18 15:19:06 -0500
committerPatrick Murphy <Patrick.Murphy@multitech.com>2020-05-18 15:19:06 -0500
commitd8c750c0968173444ac5c16af9ec8f1f7996935c (patch)
tree270568d33a203609e3ad53214a4c7a92e924e6f0 /usr/bin/rmpasswd
parent38a9fecc12d71cf88aa4667f694dbf5739127b26 (diff)
downloadcommissioning-d8c750c0968173444ac5c16af9ec8f1f7996935c.tar.gz
commissioning-d8c750c0968173444ac5c16af9ec8f1f7996935c.tar.bz2
commissioning-d8c750c0968173444ac5c16af9ec8f1f7996935c.zip
populated rmpasswd data via passwd call
Diffstat (limited to 'usr/bin/rmpasswd')
-rw-r--r--usr/bin/rmpasswd10
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:]]')"