aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-01-21 19:46:52 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-01-21 19:47:50 -0500
commitaaaa1ffea1a086e48f8a885453551839da9c3a21 (patch)
treeb786c181c20eb04325770e17b51ba509a48c4154
parent6a36c9831f9127aa1f82cb425e60f8e003877eee (diff)
downloadGradeBook-aaaa1ffea1a086e48f8a885453551839da9c3a21.tar.gz
GradeBook-aaaa1ffea1a086e48f8a885453551839da9c3a21.zip
Command to set new password for a user
-rwxr-xr-xpasswd_db.tcl35
1 files changed, 35 insertions, 0 deletions
diff --git a/passwd_db.tcl b/passwd_db.tcl
new file mode 100755
index 0000000..c2f2d9b
--- /dev/null
+++ b/passwd_db.tcl
@@ -0,0 +1,35 @@
+#!/bin/sh
+# (C) 2011 by Eugeniy Mikhailov, <evgmik@gmail.com>
+# vim:set ft=tcl: \
+exec tclsh "$0" "$@"
+
+# set new password for user name
+# create user
+
+package require sqlite3
+package require md5
+source ./GradeBook_lib.tcl
+
+if { $argc < 3 } {
+ puts {Usage:}
+ puts "$argv0 database_file_name user_name password"
+ exit
+}
+
+set db_file [lindex $argv 0]
+set user_name [lindex $argv 1]
+
+if { $argc >= 3 } {
+ set password [lindex $argv 2]
+} else {
+ set password {}
+}
+
+# override default password DB name
+set GradebookServerConfig(passwords_db_file) $db_file
+
+Set_New_Password_Non_Web $user_name $password
+
+
+
+# vim: ts=2 sw=2 foldmethod=indent: