# HG changeset patch # User Pascal Volk # Date 1392490840 0 # Node ID 69eb7a65d8a465d5d8f59768701848b6f79ff8b9 # Parent 695426b49de0fa85e0340ac36db284bccf76860b VMM/cli/subcommands: userpassword added option -s. -s SCHEME can be used to (temporarily) override the password_scheme setting, configured in vmm.cfg. diff -r 695426b49de0 -r 69eb7a65d8a4 VirtualMailManager/cli/subcommands.py --- a/VirtualMailManager/cli/subcommands.py Sat Feb 15 18:07:00 2014 +0000 +++ b/VirtualMailManager/cli/subcommands.py Sat Feb 15 19:00:40 2014 +0000 @@ -396,7 +396,8 @@ def user_password(ctx): """update the password for the given address""" - ctx.hdlr.user_password(ctx.args.address.lower(), ctx.args.password) + ctx.hdlr.user_password(ctx.args.address.lower(), ctx.args.password, + ctx.args.scheme) def user_note(ctx): @@ -832,12 +833,15 @@ help=_('update the password for the given address'), epilog=fill(_("The password of an account can be updated with this " "subcommand.\n\nIf no password was provided, vmm will prompt " - "for it interactively.")), + "for it interactively. When the scheme was omitted, vmm will " + "use misc.password_scheme from vmm.cfg. ")), formatter_class=RawDescriptionHelpFormatter) up.add_argument('address', help=_("an account's e-mail address (local-part@fqdn)")) up.add_argument('-p', metavar='PASSWORD', dest='password', help=_("the user's new password")) + up.add_argument('-s', metavar='SCHEME', dest='scheme', + help=_('scheme used for password hashing')) up.set_defaults(func=user_password, scmd='userpassword') uq = a('userquota', aliases=('uq',),