summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklm1998-04-13 18:54:53 +0000
committerklm1998-04-13 18:54:53 +0000
commit6a5fd97399bdb1e8c99f7c9a486694cf244e9641 (patch)
tree7caa38562b45e4e1db7fca57d418b611b0b8e862
parent2b1d50f7c157e886a04207a9413d7e4feb7165bf (diff)
downloadmailman-6a5fd97399bdb1e8c99f7c9a486694cf244e9641.tar.gz
mailman-6a5fd97399bdb1e8c99f7c9a486694cf244e9641.tar.zst
mailman-6a5fd97399bdb1e8c99f7c9a486694cf244e9641.zip
Rudimentary script to set the site password.
-rwxr-xr-xbin/mmsitepass32
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/mmsitepass b/bin/mmsitepass
new file mode 100755
index 000000000..28ecdb5ae
--- /dev/null
+++ b/bin/mmsitepass
@@ -0,0 +1,32 @@
+#!/usr/local/bin/python
+
+"""Set the site password, using the argument passed in the command line.
+
+The site password can be used in most if not all places that the list
+administrator's password can be used, which in turn can be used in most
+places that a list users password can be used."""
+
+__version__ = "$Revision: 446 $"
+# $Source$
+
+import sys
+
+sys.path.append('/home/mailman/mailman/modules')
+
+import maillist
+
+def main(argv):
+ if len(sys.argv) != 2:
+ print "Usage: mmsitepass password"
+ raise SystemExit, 1
+ l = maillist.MailList()
+ l.SetSiteAdminPassword(sys.argv[1])
+ if l.CheckSiteAdminPassword(sys.argv[1]):
+ print "Password changed."
+ raise SystemExit, 0
+ else:
+ print "Password change failed."
+ raise SystemExit, 1
+
+if __name__ == "__main__":
+ main(sys.argv)