Re: [Zope] Change admin's password

2009-12-31 Thread Maurits van Rees
Lennart Regebro, on 2009-12-30:
> On Wed, Dec 30, 2009 at 19:45, iarly selbir | ski0s  wrote:
>> A bit I forgot mentions, my Zope is using relstorage to store all data on
>> MySQL
>
> Good. Then the answer I gave you from the start still is the correct one.

Yes, 'bin/instance adduser joe secret' should work fine, whether you
use zodb or relstorage.

Do note that you cannot use this to *change* a password of an existing
user.  If joe already exists, this command will do nothing and quit
silently.

With a bit of hacking you may be able to change that.  Look at the
do_adduser method in Zope2/Startup/zopectl.py

-- 
Maurits van Rees | http://maurits.vanrees.org/
Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread Lennart Regebro
On Wed, Dec 30, 2009 at 19:45, iarly selbir | ski0s  wrote:
> A bit I forgot mentions, my Zope is using relstorage to store all data on
> MySQL

Good. Then the answer I gave you from the start still is the correct one.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread iarly selbir | ski0s
A bit I forgot mentions, my Zope is using relstorage to store all data on
MySQL, = ), below is the tables for database that some instance uses

mysql> show tables;
+---+
| Tables_in_mydb   |
+---+
| current_object|
| new_oid   |
| object_ref|
| object_refs_added |
| object_state  |
| pack_object   |
| pack_state|
| pack_state_tid|
| transaction   |
+---+
9 rows in set (0.00 sec)


the most of data on tables above is in binary

Regards,

- -
iarly selbir | ski0s

:wq!


On Wed, Dec 30, 2009 at 3:36 PM, Lennart Regebro  wrote:

> On Wed, Dec 30, 2009 at 18:29, iarly selbir | ski0s 
> wrote:
> > sorry, if I don't explained right
> >
> > through /manager/acl_users I can change users passwords, right?
>
> Yes.
>
> > I'm trying to find out how to do it by command line
>
> You can't, unless you write a custom command for it, which is likely
> to be more complicated that you'd like.
>
> --
> Lennart Regebro: Python, Zope, Plone, Grok
> http://regebro.wordpress.com/
> +33 661 58 14 64
>
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread Lennart Regebro
On Wed, Dec 30, 2009 at 18:29, iarly selbir | ski0s  wrote:
> sorry, if I don't explained right
>
> through /manager/acl_users I can change users passwords, right?

Yes.

> I'm trying to find out how to do it by command line

You can't, unless you write a custom command for it, which is likely
to be more complicated that you'd like.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread Lennart Regebro
On Wed, Dec 30, 2009 at 17:14, iarly selbir | ski0s  wrote:
> I guess when Zope store data at mysql, isn't a simple UPDATE TABLE set
> Password...

Well why not?

> heh did you already take a look on tables created by zope on
> MySQL

Zope itself doesn't create *any* tables in MySQL. As mentioned, it
uses the ZODB. If you store users and paswords in MySQL, that's
something custom for your sites, and how it's stored there is
completely up to whoever did that integration. You need to ask them.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread iarly selbir | ski0s
sorry, if I don't explained right

through /manager/acl_users I can change users passwords, right?

I'm trying to find out how to do it by command line

Regards,

- -
iarly selbir | ski0s

:wq!


On Wed, Dec 30, 2009 at 2:20 PM, Justin Dunsworth <
justin.dunswo...@gmail.com> wrote:

> If you are wanting to update a password on a MySQL table then yes, a simple
> 'UPDATE TABLE users SET password = 'newpass' WHERE username = 'admin';" will
> work. If you are wanting it in MD5 digest form just use "SET password =
> MD5('newpass')"
>
> As Lennart mentioned, if you are using multiple databases for each instance
> then you'll have to do that to all.
>
> On Wed, Dec 30, 2009 at 11:16 AM, iarly selbir | ski0s 
> wrote:
>
>> someone experienced in that?
>>
>>
>> Regards,
>>
>> - -
>> iarly selbir | ski0s
>>
>> :wq!
>>
>>
>>   On Wed, Dec 30, 2009 at 1:14 PM, iarly selbir | ski0s > > wrote:
>>
>>> I guess when Zope store data at mysql, isn't a simple UPDATE TABLE set
>>> Password... heh did you already take a look on tables created by zope on
>>> MySQL and as it store the objects... ? is slightly different we know
>>>
>>>
>>> Regards,
>>>
>>> - -
>>> iarly selbir | ski0s
>>>
>>> :wq!
>>>
>>>
>>>   On Wed, Dec 30, 2009 at 1:07 PM, Lennart Regebro wrote:
>>>
 On Wed, Dec 30, 2009 at 14:27, iarly selbir | ski0s 
 wrote:
 > No, I'm using MySQL as database..

 Well if you are storing your users in MySQL, then change the password
 in that table. Done!

 > I have to browse to http://hostname:port/manager and change them (
 for each
 > instance )

 If the instances use different databases, then you need to change it
 for each database, yes.

 --
  Lennart Regebro: Python, Zope, Plone, Grok
 http://regebro.wordpress.com/
 +33 661 58 14 64

>>>
>>>
>>
>> ___
>> Zope maillist  -  Zope@zope.org
>> https://mail.zope.org/mailman/listinfo/zope
>> **   No cross posts or HTML encoding!  **
>> (Related lists -
>>  https://mail.zope.org/mailman/listinfo/zope-announce
>>  https://mail.zope.org/mailman/listinfo/zope-dev )
>>
>>
>
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread Justin Dunsworth
If you are wanting to update a password on a MySQL table then yes, a simple
'UPDATE TABLE users SET password = 'newpass' WHERE username = 'admin';" will
work. If you are wanting it in MD5 digest form just use "SET password =
MD5('newpass')"

As Lennart mentioned, if you are using multiple databases for each instance
then you'll have to do that to all.

On Wed, Dec 30, 2009 at 11:16 AM, iarly selbir | ski0s wrote:

> someone experienced in that?
>
>
> Regards,
>
> - -
> iarly selbir | ski0s
>
> :wq!
>
>
>   On Wed, Dec 30, 2009 at 1:14 PM, iarly selbir | ski0s 
> wrote:
>
>> I guess when Zope store data at mysql, isn't a simple UPDATE TABLE set
>> Password... heh did you already take a look on tables created by zope on
>> MySQL and as it store the objects... ? is slightly different we know
>>
>>
>> Regards,
>>
>> - -
>> iarly selbir | ski0s
>>
>> :wq!
>>
>>
>>   On Wed, Dec 30, 2009 at 1:07 PM, Lennart Regebro wrote:
>>
>>> On Wed, Dec 30, 2009 at 14:27, iarly selbir | ski0s 
>>> wrote:
>>> > No, I'm using MySQL as database..
>>>
>>> Well if you are storing your users in MySQL, then change the password
>>> in that table. Done!
>>>
>>> > I have to browse to http://hostname:port/manager and change them ( for
>>> each
>>> > instance )
>>>
>>> If the instances use different databases, then you need to change it
>>> for each database, yes.
>>>
>>> --
>>>  Lennart Regebro: Python, Zope, Plone, Grok
>>> http://regebro.wordpress.com/
>>> +33 661 58 14 64
>>>
>>
>>
>
> ___
> Zope maillist  -  Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope-dev )
>
>
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread iarly selbir | ski0s
someone experienced in that?

Regards,

- -
iarly selbir | ski0s

:wq!


On Wed, Dec 30, 2009 at 1:14 PM, iarly selbir | ski0s wrote:

> I guess when Zope store data at mysql, isn't a simple UPDATE TABLE set
> Password... heh did you already take a look on tables created by zope on
> MySQL and as it store the objects... ? is slightly different we know
>
>
> Regards,
>
> - -
> iarly selbir | ski0s
>
> :wq!
>
>
> On Wed, Dec 30, 2009 at 1:07 PM, Lennart Regebro wrote:
>
>> On Wed, Dec 30, 2009 at 14:27, iarly selbir | ski0s 
>> wrote:
>> > No, I'm using MySQL as database..
>>
>> Well if you are storing your users in MySQL, then change the password
>> in that table. Done!
>>
>> > I have to browse to http://hostname:port/manager and change them ( for
>> each
>> > instance )
>>
>> If the instances use different databases, then you need to change it
>> for each database, yes.
>>
>> --
>> Lennart Regebro: Python, Zope, Plone, Grok
>> http://regebro.wordpress.com/
>> +33 661 58 14 64
>>
>
>
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread iarly selbir | ski0s
I guess when Zope store data at mysql, isn't a simple UPDATE TABLE set
Password... heh did you already take a look on tables created by zope on
MySQL and as it store the objects... ? is slightly different we know

Regards,

- -
iarly selbir | ski0s

:wq!


On Wed, Dec 30, 2009 at 1:07 PM, Lennart Regebro  wrote:

> On Wed, Dec 30, 2009 at 14:27, iarly selbir | ski0s 
> wrote:
> > No, I'm using MySQL as database..
>
> Well if you are storing your users in MySQL, then change the password
> in that table. Done!
>
> > I have to browse to http://hostname:port/manager and change them ( for
> each
> > instance )
>
> If the instances use different databases, then you need to change it
> for each database, yes.
>
> --
> Lennart Regebro: Python, Zope, Plone, Grok
> http://regebro.wordpress.com/
> +33 661 58 14 64
>
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread Lennart Regebro
On Wed, Dec 30, 2009 at 14:27, iarly selbir | ski0s  wrote:
> No, I'm using MySQL as database..

Well if you are storing your users in MySQL, then change the password
in that table. Done!

> I have to browse to http://hostname:port/manager and change them ( for each
> instance )

If the instances use different databases, then you need to change it
for each database, yes.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread iarly selbir | ski0s
No, I'm using MySQL as database.. there are some solution for it? currently
I have to browse to http://hostname:port/manager and change them ( for each
instance )

Regards,

- -
iarly selbir | ski0s

:wq!


On Wed, Dec 30, 2009 at 9:40 AM, Lennart Regebro  wrote:

> On Wed, Dec 30, 2009 at 13:13, iarly selbir | ski0s 
> wrote:
> > There are some command to change admin's password, in my env I have a
> server
> > with many instances and I need change it for all
> > Thanks in advance for some tip.
>
> You can add new admin users with "{instance} adduser username
> password". where {instance} is the command you use to start your
> instance. Often bin/instance or bin/zopectl.
>
> It works for all instances at once, since it's stored in the ZODB.
>
> --
> Lennart Regebro: Python, Zope, Plone, Grok
> http://regebro.wordpress.com/
> +33 661 58 14 64
>
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Change admin's password

2009-12-30 Thread Lennart Regebro
On Wed, Dec 30, 2009 at 13:13, iarly selbir | ski0s  wrote:
> There are some command to change admin's password, in my env I have a server
> with many instances and I need change it for all
> Thanks in advance for some tip.

You can add new admin users with "{instance} adduser username
password". where {instance} is the command you use to start your
instance. Often bin/instance or bin/zopectl.

It works for all instances at once, since it's stored in the ZODB.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Change admin's password

2009-12-30 Thread iarly selbir | ski0s
There are some command to change admin's password, in my env I have a server
with many instances and I need change it for all

Thanks in advance for some tip.


Regards,

- -
iarly selbir | ski0s

:wq!
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )