4 usage: %(progname)s username 9 import os, sys, string, time, getopt
15 from pyclearsilver
import odb, hdfhelp, odb_sqlite3
16 from pyclearsilver
import CSPage
24 row = db.users.lookup(username)
25 row.setPassword(password)
26 row.changePassword = 1
31 print __doc__ % vars()
33 def main(argv, stdout, environ):
35 optlist, args = getopt.getopt(argv[1:],
"", [
"help",
"test",
"debug"])
42 for (field, val)
in optlist:
46 elif field ==
"--debug":
48 elif field ==
"--test":
55 db = db_auth.initSchema(create=0)
59 password1 = getpass.getpass(
"Password 1:")
60 password2 = getpass.getpass(
"Password 2:")
61 if password1 != password2:
62 print "password mismatch." 70 if __name__ ==
"__main__":
71 main(sys.argv, sys.stdout, os.environ)
def main(argv, stdout, environ)
def changePassword(db, username, password)