summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Murphy <pmurphy@dotnet.multitech.net>2020-05-18 11:35:45 -0500
committerPatrick Murphy <pmurphy@dotnet.multitech.net>2020-05-18 11:35:45 -0500
commitf31ad9fa875dff07795ac3d4ccc32cfda6243ea2 (patch)
tree0174eb6ed204c37aae669c937d504ae49f6f1a1e
parent443c24a3ab36d0ea2324ea12265bd55939de11a2 (diff)
parent38a9fecc12d71cf88aa4667f694dbf5739127b26 (diff)
downloadcommissioning-f31ad9fa875dff07795ac3d4ccc32cfda6243ea2.tar.gz
commissioning-f31ad9fa875dff07795ac3d4ccc32cfda6243ea2.tar.bz2
commissioning-f31ad9fa875dff07795ac3d4ccc32cfda6243ea2.zip
Merge tag '1.0.1'
added rmpasswd routine
-rw-r--r--usr/bin/rmpasswd10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/bin/rmpasswd b/usr/bin/rmpasswd
new file mode 100644
index 0000000..d36b8d1
--- /dev/null
+++ b/usr/bin/rmpasswd
@@ -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