[Zope] acl_users
Sean Duffy
swduffy at unmc.edu
Wed Jan 3 14:41:53 EST 2007
Hi,
I'm trying to do a batch add of users to the standard acl_users folder.
Note quite a total success or total failure just yet.
First I made a text file (usr_pwd.txt) in the form of password space username. and placed it (temporarily) in the Extensions
directory.
Then an external method (LoadUsers) to read it:
def LoadUsers(self):
f=open('/var/lib/zope/Extensions/usr_pwd.txt', 'r')
y=f.readlines()
return y
And a script (user_load):
## Script (Python) "user_load"
##bind container=container
##bind context=context
##bind namespace=_
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
y=context.LoadUsers()
for x in y:
z=x.split(' ')
acl = container.restrictedTraverse( '/foobar/acl_users' )
acl.userFolderAddUser( z[1], z[0], '', '' )
return 0
I hit the Test tab and now I have an acl_users folder full of users with the correct user names, and their passwords show the
correct number of characters, however I can't log in using any of the user/password combinations.
Should the path '/foobar/acl_users' been simply '/foobar/' or '/foobar' ?
Any suggestions?
Thanks,
Sean
More information about the Zope
mailing list