Summary: | Koha user needs to be able to login | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | david, dcook, fridolin.somers, mtj, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.05,22.11.12
|
|
Circulation function: | |||
Attachments: |
Bug 34204: Fix koha-shell under debian 12
Bug 34204: Fix koha-shell under debian 12 Bug 34204: Fix koha-shell under debian 12 |
Description
Jonathan Druart
2023-07-05 15:18:24 UTC
I found a related discussion but not the diff that caused this change https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625758 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625758#72 """ - change and document (adduser(8)) that --disabled-password will behave like --disabled-login and additionally set the shell to /usr/sbin/nologin. """ https://salsa.debian.org/debian/adduser/-/commit/427ade7d9116af5af7baa9d0c538e14fa86560cf Make bookworm unusable in ktd. Reading through that report... does that mean that we should be using "--disabled-password" instead? Created attachment 156810 [details] [review] Bug 34204: Fix koha-shell under debian 12 In Debian 12/Bookworm: root@kohadevbox:koha$ koha-shell kohadev This account is currently not available. This is because /etc/passwd has /usr/sbin/nologin as shell, which is coming from the --disabled-login param we passed to adduser in koha-create. Looks like a bug has been fixed in adduser, because we didn't have this behavior in bullseye. Context: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625758#72 """ - change and document (adduser(8)) that --disabled-password will behave like --disabled-login and additionally set the shell to /usr/sbin/nologin. """ https://salsa.debian.org/debian/adduser/-/commit/427ade7d9116af5af7baa9d0c538e14fa86560cf Test plan: Confirm the above and that the change makes sense. I had a go at testing and this is what I get (I don't get the message "This account is currently not available."): david@david-thinkpad-t14:~/git-koha/koha-testing-docker$ ktd --root --shell root@kohadevbox:kohadevbox$ koha-shell kohadev $ To get Debian Bookworm (Debian 12) I changed KOHA-IMAGE=master-bookworm (then a ktd pull). cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" (In reply to David Nind from comment #6) > I had a go at testing and this is what I get (I don't get the message "This > account is currently not available."): > > david@david-thinkpad-t14:~/git-koha/koha-testing-docker$ ktd --root --shell > root@kohadevbox:kohadevbox$ koha-shell kohadev > $ > > To get Debian Bookworm (Debian 12) I changed KOHA-IMAGE=master-bookworm > (then a ktd pull). Yes, that's how it should be done. What is the return of `grep kohadev /etc/passwd` Created attachment 157279 [details] [review] Bug 34204: Fix koha-shell under debian 12 In Debian 12/Bookworm: root@kohadevbox:koha$ koha-shell kohadev This account is currently not available. This is because /etc/passwd has /usr/sbin/nologin as shell, which is coming from the --disabled-login param we passed to adduser in koha-create. Looks like a bug has been fixed in adduser, because we didn't have this behavior in bullseye. Context: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625758#72 """ - change and document (adduser(8)) that --disabled-password will behave like --disabled-login and additionally set the shell to /usr/sbin/nologin. """ https://salsa.debian.org/debian/adduser/-/commit/427ade7d9116af5af7baa9d0c538e14fa86560cf Test plan: Confirm the above and that the change makes sense. Signed-off-by: David Nind <david@davidnind.com> (In reply to Jonathan Druart from comment #7) > > What is the return of `grep kohadev /etc/passwd` I had another go at testing, and things seem to work as expected now. (Not sure what I did different this time!) Now signed off. Testing notes (using KTD): 1. Before applying patch (after starting KTD with KOHA-IMAGE=master-bookworm): ktd --root --shell root@kohadevbox:kohadevbox$ koha-shell kohadev This account is currently not available. root@kohadevbox:kohadevbox$ grep kohadev /etc/passwd kohadev-koha:x:1000:1000:Koha instance kohadev-koha,,,:/var/lib/koha/kohadev:/usr/sbin/nologin 2. After applying the patch (and shutting down then starting up KTD again): david@david-thinkpad-t14:~/git-koha/koha-testing-docker$ ktd --root --shell $ $ grep kohadev /etc/passwd kohadev-koha:x:1000:1000:Koha instance kohadev-koha,,,:/var/lib/koha/kohadev:/bin/bash Created attachment 157288 [details] [review] Bug 34204: Fix koha-shell under debian 12 In Debian 12/Bookworm: root@kohadevbox:koha$ koha-shell kohadev This account is currently not available. This is because /etc/passwd has /usr/sbin/nologin as shell, which is coming from the --disabled-login param we passed to adduser in koha-create. Looks like a bug has been fixed in adduser, because we didn't have this behavior in bullseye. Context: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625758#72 """ - change and document (adduser(8)) that --disabled-password will behave like --disabled-login and additionally set the shell to /usr/sbin/nologin. """ https://salsa.debian.org/debian/adduser/-/commit/427ade7d9116af5af7baa9d0c538e14fa86560cf Test plan: Confirm the above and that the change makes sense. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.05 Nice work everyone! Pushed to oldstable for 22.11.x |