[Zope-Checkins] CVS: Zope2 - Makefile:1.1.2.1 zpasswd.py:1.12.60.1
evan@serenade.digicool.com
evan@serenade.digicool.com
Thu, 19 Apr 2001 15:46:47 -0400
Update of /cvs-repository/Zope2
In directory serenade.digicool.com:/home/evan/Zope/trunk
Modified Files:
Tag: evan-makefile-branch
zpasswd.py
Added Files:
Tag: evan-makefile-branch
Makefile
Log Message:
Add makefile-driven installation process
--- Added File Makefile in package Zope2 ---
PYTHON = python
all:
$(PYTHON) inst/compile_all.py
.PHONY: pcgi
pcgi:
$(PYTHON) inst/build_pcgi.py
install:
$(PYTHON) inst/make_instance.py
--- Updated File zpasswd.py in package Zope2 --
--- zpasswd.py 2000/12/08 01:31:03 1.12
+++ zpasswd.py 2001/04/19 19:46:17 1.12.60.1
@@ -160,6 +160,31 @@
import do; do.ch(ac_path, user, group)
+def choose_inituser(home, user='', group=''):
+ ac_path=os.path.join(home, 'inituser')
+ if not os.path.exists(ac_path):
+ print '-'*78
+ print 'Please choose a username and password.'
+ print 'This will create the initial user with which you manage Zope.'
+ username = raw_input("Username: ")
+ if username == '':
+ return
+
+ while 1:
+ pw = getpass.getpass("Password: ")
+ verify = getpass.getpass("Verify password: ")
+ if verify == pw:
+ break
+ else:
+ pw = verify = ''
+ print "Password mismatch, please try again..."
+ acfile=open(ac_path, 'w')
+ acfile.write('%s:%s' % (username, generate_passwd(pw, 'SHA')))
+ acfile.close()
+ os.system('chmod 644 %s' % ac_path)
+
+ import do; do.ch(ac_path, user, group)
+
def main(argv):
short_options = ':u:p:e:d:'