[Koha] Reset the password for superlibrarian ?
Quỳnh Vũ Đỗ
quynhvd at thanglong.edu.vn
Sat May 16 19:47:04 NZST 2020
Hello everyone,
Thanks to useful advice provided by the list community, I was able to
upgrade from Koha 3.18 to Koha 19.11.05
I could open the Staff login window. I am now faced with login in to Koha
as administrator to perform some maintenance tasks. I managed to found how
to get into a Koha shell and run the script
/usr/share/koha/bin/devel/create_superlibrarian.pl
With Usage:
create_superlibrarian.pl --userid <userid> --password <password>
--branchcode <branchcode> --categorycode <categorycode> --cardnumber
<cardnumber>
So I tried with values without any quotes, with double quotes and simple
quotes to always face the same error:
DBD::mysql::st execute failed: Duplicate entry 'BGH000001' for key
'cardnumber' [for Statement "INSERT INTO `borrowers` ( `borrowernumber`,
`branchcode`, `cardnumber`, `categorycode`, `dateenrolled`, `dateexpiry`,
`flags`, `password`, `privacy`, `surname`, `userid`) VALUES ( ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0=undef, 1='TLU', 2='BGH000001',
3='CB', 4='2020-05-16T14:29:34', 5='2021-05-16T14:29:34', 6='1', 7='!',
8=1, 9=undef, 10="2"] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line
1834.
But as the superlibraian already exists, then I cannot insert an other one
- so the duplicate entry. What I would need is a simple UPDATE statement to
reset the password of the superlibrarian with userid thanglong with a
"newpassword"
Is it safe to enter the following command from a mysql shell
USE koha_library;
UPDATE `borrowers` SET `password` = PASSWORD("newpassord") WHERE
`userid`="thanglong";
I eventually tried it, but still was not able to log in.
Any hint on how to reset that password for the first row of the table
boowers?
Thanks for reading
Quynh
=================
M. Vũ Đỗ Quỳnh (Ph.D)
Trường Đại học Thăng Long - Université de Thang Long - Thang Long
University (Hanoi, Vietnam)
Phó Hiệu Trưởng, phụ trách HTQT - Vice-recteur chargé de la coopération
internationale - Vice-Rector in charge of International Cooperation
Web: http://thanglong.edu.vn/
More information about the Koha
mailing list