Hello Jonathan Thanks for the info. I already solved my problem but I will try it as it's good to know. Best regards 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/ Vào Th 2, 18 thg 5, 2020 vào lúc 15:46 Jonathan Druart < jonathan.dru...@bugs.koha-community.org> đã viết: > Hello Quynh, > > Use the script misc/admin/set_password.pl > > Regards, > Jonathan > > Le sam. 16 mai 2020 à 09:47, Quỳnh Vũ Đỗ <quyn...@thanglong.edu.vn> a > écrit : > > > > 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/ > > _______________________________________________ > > > > Koha mailing list http://koha-community.org > > Koha@lists.katipo.co.nz > > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha > _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha