[Bug 39676] New: koha-reset-passwd fails
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39676 Bug ID: 39676 Summary: koha-reset-passwd fails Change sponsored?: --- Product: Koha Version: 22.11 Hardware: All OS: Linux Status: NEW Severity: minor Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: david.liddle@wycliff.de QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Hello! I discovered today that using the command koha-reset-passwd fails on Koha 22.11.25 with the following error: env: ‘/bin/admin/set_password.pl’: No such file or directory The command was run as indicated in --help: sudo koha-reset-passwd instancename userid Directly running the underlying script succeeds: sudo koha-shell -c '/usr/share/koha/bin/admin/set_password.pl --userid userid' instancename In this particular case, the userid takes the form of an email address, and I thought perhaps the '@' symbol may have been problematic, but the command also fails for a userid that follows the default pattern of firstname.surname. Am I doing something wrong, or is there a bug in the command? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39676 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 39675 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39676 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|22.11 |Main -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39676 --- Comment #2 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212478&action=edit Bug 39676: Read /etc/default/koha-common in koha-reset-passwd Bug 39676: Read /etc/default/koha-common in koha-reset-passwd koha-reset-passwd runs $KOHA_HOME/$KOHA_BINDIR/admin/set_password.pl, but unlike koha-plack, koha-shell, koha-create and the other scripts it never reads /etc/default/koha-common, where KOHA_HOME and PERL5LIB are set. On a package install adjust_paths_git_install only sets KOHA_BINDIR, so the script ran /bin/admin/set_password.pl: env: '/bin/admin/set_password.pl': No such file or directory It works in KTD only because there the instance is a git install. Test plan: 1. In KTD, pretend to be a package install: sudo GIT_INSTALL=0 sh debian/scripts/koha-reset-passwd kohadev <a userid> env: '/bin/admin/set_password.pl': No such file or directory, exit 1. 2. Apply the patch, repeat 1: the userid and a new password are printed, exit 0, and the patron can log in with it. 3. sudo sh debian/scripts/koha-reset-passwd kohadev <a userid> (git install, as before) still works. Sponsored-by: Koha Solutions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39676 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39676 --- Comment #3 from babar junaid <babarjunaid1122@gmail.com> --- I hit the same thing on a fresh Koha 26.05.05 package install on Ubuntu 24.04: sudo koha-reset-passwd library jsmith env: '/bin/admin/set_password.pl': No such file or directory koha-reset-passwd never reads /etc/default/koha-common, where KOHA_HOME and PERL5LIB are set (koha-plack, koha-shell, koha-create and the others all read it). On a package install KOHA_HOME is therefore empty, and the script runs /bin/admin/set_password.pl. It works in KTD only because there the instance is a git install. The patch reads the file the same way koha-plack does. In KTD you can see the package-install behaviour with GIT_INSTALL=0 (test plan in the patch). Until it is pushed, this works on a package install: sudo KOHA_HOME=/usr/share/koha PERL5LIB=/usr/share/koha/lib koha-reset-passwd <instance> <userid> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org