summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.gateway/WebContent/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/com.gluster.storage.management.gateway/WebContent/scripts')
-rw-r--r--src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh b/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh
new file mode 100644
index 00000000..4edf0ffd
--- /dev/null
+++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh
@@ -0,0 +1,21 @@
+#-----------------------------------------------------------------------------------
+# gmg-reset-password.sh - script to reset password of given user to default password
+#-----------------------------------------------------------------------------------
+
+USAGE_ERR=1
+
+if [ $# -ne 1 ]; then
+ echo "Usage: ${0} <username>"
+ echo
+ exit ${USAGE_ERR}
+fi
+
+# Main action body
+cd ..
+for FILE in WEB-INF/lib/*.jar
+do
+ export CLASSPATH=${CLASSPATH}:${PWD}/${FILE}
+done
+export CLASSPATH=${PWD}/WEB-INF/classes:${CLASSPATH}
+cd -
+java com.gluster.storage.management.gateway.utils.PasswordManager reset ${1}