[Zope] Re: Export usernames and passwords
Zachery Bir
zbir at urbanape.com
Fri Aug 13 10:10:31 EDT 2004
On Aug 12, 2004, at 11:50 AM, Josef Meile wrote:
> --- In zope at yahoogroups.com, Øystein Thune <thune at i...> wrote:
> > Thank you for replying. This could be interesting if I could use the
> usernames
> > & encrypted passwords directly into a htpasswd file. Anybody knows
> what kind of
> > encryption is used?
> You can choose it. I created a emergency user with zpasswd and it
> asked me what kind of encryption I would like either SHA or CRYPT.
>
> I noticed not all the users have encrypted passwords. I have two users
> the admin and my user on the basic Zope UserFolder of a fresh install
> of Zope 2.7.2-RC1. "admin" has an encrypted password because I created
> it with zpasswd, but my normal user was created from the ZMI and has a
> plain password. Why isn't this included by default? Or at least an
> option on the manage_addUser method to choose either or not to encrypt
> the password?
You can change the property of the User Folder to encrypt by default
(and at the same time encrypt all unencrypted passwords). For the life
of me, I can't imagine why it's not the default. Probably because it's
one-way, so any admins who later decide they want to be sloppy can't.
;^)
> > >>I have a Plone-site that has a bunch of registered users. How can
> I export both
> > >>usernames AND passwords from the zope-database. I want to use
> these to access
> > >>another application.
> > >>
> > >>Please don't answer "You just have to write a script", because I
> don't know how
> > >>to do that.
> That's the only answer. You can't get them from the air
> A good external method to start:
> http://www.zopelabs.com/cookbook/1008698882
>
> to get the password, just call the _getPassword method of the user
> object.
Gah! That method should *so* die. If you do this, make sure that your
other application uses the same auth encoding, or you won't
authenticate properly. See AccessControl.AuthEncoding
Zac
More information about the Zope
mailing list