Change user password using trytond-console

Hello.

Does anyone know if it’s possible to change a user password using.

Trytond-console?

I tried with a user instance:

user.set_password(‘newpass’)
But it requires name and value?

Thanks for any help.

There is this issue:

But it uses trytond-admin.

With trytond-console you should indeed use User.set_password(user_instance, 'whatever', your_password).

1 Like

Here’s the working example for me:

User = Pool().get('res.user')
admin = User(1) # Admin
User.set_password([admin], 'name', 'mynewpassword')
transaction.commit()

Thanks!!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.