3 ### Remote service commands
5 ### (c) 2013 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of Chopwood: a password-changing service.
12 ### Chopwood is free software; you can redistribute it and/or modify
13 ### it under the terms of the GNU Affero General Public License as
14 ### published by the Free Software Foundation; either version 3 of the
15 ### License, or (at your option) any later version.
17 ### Chopwood is distributed in the hope that it will be useful,
18 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ### GNU Affero General Public License for more details.
22 ### You should have received a copy of the GNU Affero General Public
23 ### License along with Chopwood; if not, see
24 ### <http://www.gnu.org/licenses/>.
27 import subcommand
as SC
32 'Set password for remote service',
33 params
= [SC
.Arg('service'), SC
.Arg('user')])
34 def cmd_set_svc(service
, user
):
35 new
= U
.readline('new password')
36 svc
= CU
.check_service(service
)
37 svc
.setpasswd(user
, new
)
41 'Clear password for remote service',
42 params
= [SC
.Arg('service'), SC
.Arg('user')])
43 def cmd_set_svc(service
, user
):
44 svc
= CU
.check_service(service
)
47 ###----- That's all, folks --------------------------------------------------