summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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