]> git.koha-community.org Git - koha.git/commit
Bug 17746: Add misc/admin/set_password.pl script
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 4 Feb 2019 18:09:34 +0000 (15:09 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 1 Apr 2019 16:19:12 +0000 (16:19 +0000)
commitc6651b872421cce5415694fbf173c38a094c1321
tree250aa5babf5e9a7afb1edeb8381c3c76896cd520
parenta12ad9f12260bed9732bcaa4b663c109a3b4572e
Bug 17746: Add misc/admin/set_password.pl script

This patch introduces a script that allows changing a patron's password.
The change overrides the defined password enforcement policy.

If multiple conditions are passed to match on the patron, they all need
to match. Otherwise an error message is printed.

Attributes to search the patron on:
- cardnumber
- patron_id (a.k.a. borrowernumber)
- userid

we usually know some of them, but if we specify more than one, they need
to match a patron, together.

To test:
1) Apply this patch
2) Have a known patron (i.e. you know the cardnumber, the borrowernumber
   and the userid).
3) Run:
  $ kshell
 k$ perl misc/admin/set_password.pl --cardnumber <the_card_number> \
                                    --password a_password
4) Verify you can login with the new password
5) Repeat 3) through 5) with --patron_id and --userid
=> SUCCESS: You can login in all cases
6) Try combining some or all the parameters
=> SUCCESS: It fails when it should, it succeeds when it should
7) Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e2f6542e1ebbd15977b47c86d2a9ef55fa0c5e9b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 54de33967101173c72865e97fce0fd220e2d0842)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
misc/admin/set_password.pl [new file with mode: 0755]