[Bug 8162] New: koha-restore creates user incorrectly
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Priority: P5 - low Change sponsored?: --- Bug ID: 8162 Assignee: jcamins@cpbibliography.com Summary: koha-restore creates user incorrectly Severity: critical Classification: Unclassified OS: All Reporter: jcamins@cpbibliography.com Hardware: All Status: NEW Version: master Component: Packaging Product: Koha For reasons that are unclear, the user created by koha-restore will not allow Koha to log into MySQL (oddly, an identical script worked fine for me on my 3.6.3-based install). The result is that after running koha-restore on a new system (and possibly even when just restoring a backup), Koha is entirely nonfunctional. Patch forthcoming. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Sorry, my mistake. MySQL 5.5 on Precise Pangolin does recognize '%' as a host wildcard that includes localhost. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- Summary|koha-restore creates user |packaging scripts create |incorrectly |user incorrectly --- Comment #2 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- I changed my mind. This is a bug. The packages will not work under Ubuntu 12.04. This is problematic. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robin@catalyst.net.nz --- Comment #3 from Robin Sheat <robin@catalyst.net.nz> --- Do you know why? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 --- Comment #4 from Robin Sheat <robin@catalyst.net.nz> --- (and under what circumstances?) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 --- Comment #5 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Sorry, didn't notice the question. When MySQL is on the same host and the --create-db option is used on koha-create, the database users created by the script are not used by the web server because of a combination of % not matching localhost (I think), and anonymous users taking precedence over non-anonymous users in MySQL 5.5. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 Status|REOPENED |ASSIGNED Assignee|jcamins@cpbibliography.com |robin@catalyst.net.nz --- Comment #6 from Robin Sheat <robin@catalyst.net.nz> --- Going to take a look at this now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 --- Comment #7 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 11038 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11038&action=edit Bug 8162: allow packages to work on Ubuntu Precise The newer version of MySQL in Ubuntu 12.04 installs a default 'localhost' user with no username. Due to the way that MySQL looks up user details when you connect, if you connect from localhost and the user was only created with a wildcard host (%), the anonymous localhost user will be found instead. This means that your username is lost for the connection, and you have no privileges. This patch creates a second user with a hostname of 'localhost'. This will not work if your database is on a remote server, but you probably know what you are doing if that's the case. Patches to determine this server's name relative to the MySQL server are welcome (or even ideas on how to do it.) It also fixes up a couple of other small things: * make koha-remove stop zebra properly * stop the warning that the password file is missing on create -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #8 from Robin Sheat <robin@catalyst.net.nz> --- These should go in to 3.6 and 3.8 also I think. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Perhaps you could take advantage of modiying this file to remove the useless use of cat: [ `cat $PASSWDFILE | grep "^$name:"` ] can be replaced with [ ` grep "^$name:" $PASSWDFILE ` ] It seems good but I have not Ubuntu for testing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11038|0 |1 is obsolete| | --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 11180 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11180&action=edit Bug 8162: allow packages to work on Ubuntu Precise The newer version of MySQL in Ubuntu 12.04 installs a default 'localhost' user with no username. Due to the way that MySQL looks up user details when you connect, if you connect from localhost and the user was only created with a wildcard host (%), the anonymous localhost user will be found instead. This means that your username is lost for the connection, and you have no privileges. This patch creates a second user with a hostname of 'localhost'. This will not work if your database is on a remote server, but you probably know what you are doing if that's the case. Patches to determine this server's name relative to the MySQL server are welcome (or even ideas on how to do it.) It also fixes up a couple of other small things: * make koha-remove stop zebra properly * stop the warning that the password file is missing on create Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Works as promised. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |mtj@kohaaloha.com --- Comment #11 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #10)
Created attachment 11180 [details] Bug 8162: allow packages to work on Ubuntu Precise
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Works as promised.
i'm going to pass QA on this, despite Jonathan's 'cat' suggestion (hope thats ok) mason@xen1:~/git/head$ koha-qa.pl * c1f0e96 Bug 8162: allow packages to work on Ubuntu Precise debian/scripts/koha-create debian/scripts/koha-remove - perlcritic-progressive tests... OK - perl -c syntax tests... OK - xt/tt_valid.t tests... OK - xt/author/valid-template.t tests... OK -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> --- Important patch, will allow the packages to work cleanly on Ubuntu 12.04 for 3.8.4 pushed to 3.8.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Version|master |rel_3_8 --- Comment #13 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to master today (I haven't tested it, I haven't the needed environment) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8162 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org