Commit 03423594 authored by Jim Fulton's avatar Jim Fulton

Submitter: Martijn Pieters

Description: With the new zpasswd.py you can generate encrypted
passwords for the access file. You can specify an optional '-d' or
'--domains' argument specifying the optional domains restriction
string.

This string is written to the access file without the leading colon.
parent bf61d5a0
......@@ -85,7 +85,7 @@
##############################################################################
"""Zope password change system"""
__version__='$Revision: 1.4 $ '[11:-2]
__version__='$Revision: 1.5 $ '[11:-2]
import sys, string, sha, binascii, whrandom, getopt, getpass, os
......@@ -196,7 +196,7 @@ Copyright (C) 1999 Digital Creations, Inc.
elif (opt[0] == '-e') or (opt[0] == '--encoding'):
encoding = opt[1]
elif (opt[0] == '-d') or (opt[0] == '--domains'):
domains = opt[1]
domains = ":" + opt[1]
# Verify that we got what we need
if not username or not password:
......@@ -235,6 +235,7 @@ CLEARTEXT - no protection.
break
domains = raw_input("Domain restrictions: ")
if domains: domains = ":" + domains
access_file.write(username + ":" +
generate_passwd(password, encoding) +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment