summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Murphy <Patrick.Murphy@multitech.com>2020-05-14 13:35:17 -0500
committerPatrick Murphy <Patrick.Murphy@multitech.com>2020-05-14 13:35:17 -0500
commitec6bb4a539bb5c30dbb56300a9c5e2861fab279a (patch)
treee583366d110341076b87a66b608cca8659c3ffeb
parent443c24a3ab36d0ea2324ea12265bd55939de11a2 (diff)
downloadcommissioning-ec6bb4a539bb5c30dbb56300a9c5e2861fab279a.tar.gz
commissioning-ec6bb4a539bb5c30dbb56300a9c5e2861fab279a.tar.bz2
commissioning-ec6bb4a539bb5c30dbb56300a9c5e2861fab279a.zip
added rmpasswd.sh to permit password resets via reset-handler
-rw-r--r--usr/bin/rmpasswd.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/bin/rmpasswd.sh b/usr/bin/rmpasswd.sh
new file mode 100644
index 0000000..d36b8d1
--- /dev/null
+++ b/usr/bin/rmpasswd.sh
@@ -0,0 +1,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 \ No newline at end of file