How do I reset Koha's admin password so I can log into the Web-based administrative interface? An embarrassingly long time ago, ran some command that seemed to wipe out a whole lot Koha's preferences. Since then I have not been able to log into the Web-based administrative interface on port 8080. How to I create a username/password combination so I can use the administrative backend again? -- Eric Morgan Infomotions, LLC
Hi Eric. You can use this script: - misc/devel/create_superlibrarian.pl --help I think the options would be something like create_superlibrarian.pl --userid <your_username> --password <your_new_password> --branchcode <your_library_code> --categorycode <your_patron_category> We should really add this to our documentation! David Nind New Zealand On Tue, 13 Jan 2026 at 07:27, Eric Lease Morgan <eric_morgan@infomotions.com> wrote:
How do I reset Koha's admin password so I can log into the Web-based administrative interface?
An embarrassingly long time ago, ran some command that seemed to wipe out a whole lot Koha's preferences. Since then I have not been able to log into the Web-based administrative interface on port 8080. How to I create a username/password combination so I can use the administrative backend again?
-- Eric Morgan Infomotions, LLC
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
On Jan 12, 2026, at 2:01 PM, David Nind <david@davidnind.com> wrote:
How do I reset Koha's admin password so I can log into the Web-based administrative interface?
You can use this script:
- misc/devel/create_superlibrarian.pl --help
I think the options would be something like create_superlibrarian.pl --userid <your_username> --password <your_new_password> --branchcode <your_library_code> --categorycode <your_patron_category>
We should really add this to our documentation!
-- David Nind New Zealand
Thank you for the prompt reply, but alas, the create_superlibrarian.pl seems to require all of options: Usage: create_superlibrarian.pl --userid <userid> --password <password> --branchcode <branchcode> --categorycode <categorycode> --cardnumber <cardnumber> Options: -?|--help brief help message --userid specify the userid to be set --password specify the password to be set --branchcode specify the library code --categorycode specify the patron category code --cardnumber specify the cardnumber to be set And I do not know of any values for --categorycode nor --cardnumber. 'Got any suggestions? -- Eric Morgan
On Jan 12, 2026, at 2:34 PM, Eric Lease Morgan <eric_morgan@infomotions.com> wrote:
How do I reset Koha's admin password so I can log into the Web-based administrative interface?
You can use this script:
- misc/devel/create_superlibrarian.pl --help
I think the options would be something like create_superlibrarian.pl --userid <your_username> --password <your_new_password> --branchcode <your_library_code> --categorycode <your_patron_category>
We should really add this to our documentation!
-- David Nind New Zealand
Thank you for the prompt reply, but alas, the create_superlibrarian.pl seems to require all of options:... And I do not know of any values for --categorycode nor --cardnumber. 'Got any suggestions?
-- Eric Morgan
Yes, the create_superlibrarian.pl script does the trick, but one needs known values for --branchcode and --categorycode. To get these values I needed to query the underlying database, something like this: $ sudo mysql -u koha_catalog -p
use koha_catalog; select * from branches; select * from categories;
From the results I learned by branch code was ININI and my category code was PATRON. I then ran the following command: ./create_superlibrarian.pl --userid ericleasemorgan \ --password "foobarbaz" --branchcode ININI \ --categorycode PATRON --cardnumber 12912 I ignored the following errors the script returned: Use of uninitialized value $email in string ne at /usr/share/koha/lib/Koha/Patron.pm line 1445. Use of uninitialized value $email in string ne at /usr/share/koha/lib/Koha/Patron.pm line 1445. Use of uninitialized value $email in string ne at /usr/share/koha/lib/Koha/Patron.pm line 1445. Finally, I was able to open my Web browser to the port 8080 backend and log in with the new credentials. Whew! Now I will try writing a MOTD sort of thing for the public front-end. koha++ -- Eric Morgan
How do I resolve the following two errors when additional-contents.pl?category=news is called: Use of uninitialized value $interface in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122. Use of uninitialized value $theme in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122. A long time ago I submitted the wrong CLI command at the wrong time, and I believe I blew away many of Koha's preferences. Since then I have been able to re-create a new super librarian, and thus I have regained access to the administrative backend. Whew! Now I want to use the Tools functions to create news. Apparently the command to do this is: <address>/cgi-bin/koha/tools/additional-contents.pl?category=news Unfortunately, when submitted, the adminstrative interface returns HTTP error 500, and the error log includes the following two diagnostics: Use of uninitialized value $interface in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122. Use of uninitialized value $theme in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122. Languages.pm seems to be called from additional-contents.pl and the error seems to stem from the getTranslatedLanguages method. Where do the values for $interface and $theme get initialized? Maybe something in my database needs to be reset? I'm stumped, and any help would be appreciated. -- Eric Morgan Infomotions, LLC
Hi Eric. I don't think I can offer any help for this one, hopefully someone else can 8-) If you know the exact Koha version you have (More > About Koha > Server information tab > Koha version), I could send you a list of the defaults for all the system preferences. Alternatively, if it is a relatively recent version, you could use one of the demos to identify what is missing https://koha-community.org/demo/ It would be a bit tedious though! (And might not resolve the cause of the issue.) Another thing to check in the database is the number of system preferences: select * from systempreferences; (for the current main there are 897 system preferences). Depending on badly your Koha is 'borked', another alternative may be to export your record data and import it into a fresh instance (depending on how much you have customised the frameworks and other administration options). David On Tue, 13 Jan 2026 at 15:00, Eric Lease Morgan <eric_morgan@infomotions.com> wrote:
How do I resolve the following two errors when additional-contents.pl?category=news is called:
Use of uninitialized value $interface in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
Use of uninitialized value $theme in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
A long time ago I submitted the wrong CLI command at the wrong time, and I believe I blew away many of Koha's preferences. Since then I have been able to re-create a new super librarian, and thus I have regained access to the administrative backend. Whew!
Now I want to use the Tools functions to create news. Apparently the command to do this is:
<address>/cgi-bin/koha/tools/additional-contents.pl?category=news
Unfortunately, when submitted, the adminstrative interface returns HTTP error 500, and the error log includes the following two diagnostics:
Use of uninitialized value $interface in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
Use of uninitialized value $theme in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
Languages.pm seems to be called from additional-contents.pl and the error seems to stem from the getTranslatedLanguages method.
Where do the values for $interface and $theme get initialized? Maybe something in my database needs to be reset? I'm stumped, and any help would be appreciated.
-- Eric Morgan Infomotions, LLC
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Hi Eric, it sounds like your accident could create a lot of hard to predict problems along the way. I assume the problem was with the systempreferences table? Maybe consider resetting your table with the SQL included in the installer of the right version and re-configuring or at least comparing to find the missing entries. Otherwise you might keep running into issues. Hope this helps, Katrin On 13.01.26 02:59, Eric Lease Morgan wrote:
How do I resolve the following two errors when additional-contents.pl?category=news is called:
Use of uninitialized value $interface in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
Use of uninitialized value $theme in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
A long time ago I submitted the wrong CLI command at the wrong time, and I believe I blew away many of Koha's preferences. Since then I have been able to re-create a new super librarian, and thus I have regained access to the administrative backend. Whew!
Now I want to use the Tools functions to create news. Apparently the command to do this is:
<address>/cgi-bin/koha/tools/additional-contents.pl?category=news
Unfortunately, when submitted, the adminstrative interface returns HTTP error 500, and the error log includes the following two diagnostics:
Use of uninitialized value $interface in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
Use of uninitialized value $theme in concatenation (.) or string at /usr/share/koha/lib/C4/Languages.pm line 122.
Languages.pm seems to be called from additional-contents.pl and the error seems to stem from the getTranslatedLanguages method.
Where do the values for $interface and $theme get initialized? Maybe something in my database needs to be reset? I'm stumped, and any help would be appreciated.
-- Eric Morgan Infomotions, LLC
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
participants (3)
-
David Nind -
Eric Lease Morgan -
Katrin Fischer