Author Topic: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...  (Read 4471 times)

mscfw

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Hi everyone,
since the update from 6.2.7 to 7 (7.0.1) I'm facing some issues. The easy one is "Webadm" and "Samba" modules are no longer starting, this happend as a part of the major upgrade, but is repeated with the last minor updates too.
The error message looks like the following:

Code: [Select]
...
Unpacking zentyal-samba (7.0.1) over (7.0.0) ...
Setting up zentyal-samba (7.0.1) ...
 * Restarting Zentyal module: samba                                                                                                                                                                  [fail]
Invalid value for Default login shell: /usr/bin/bash.
Choose a value within the value set: /bin/sh, /bin/rbash, /bin/dash, /bin/bash, /usr/bin/screen
Processing triggers for zentyal-core (7.0.0) ...
 * Restarting Zentyal module: webadmin                                                                                                                                                               [fail]
Invalid value for Default login shell: /usr/bin/bash.
Choose a value within the value set: /bin/dash, /bin/bash, /bin/sh, /bin/rbash, /usr/bin/screen
...

Quickfix:

Code: [Select]
sudo nano /usr/share/perl5/EBox/Samba/Model/PAM.pm
replace
Code: [Select]
use constant DEFAULT_SHELL => '/usr/bin/bash';with
Code: [Select]
use constant DEFAULT_SHELL => '/bin/bash';
Did a check on 6.2.7 / 6.2.8, the line here shows '/bin/bash', so I asume a minor issue with 7.

I have no Github account, why ever it is not working, so if anyone is facing the same error, perhaps a ticket could help solving it permanently.

bye

Markus

nickpiggott

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +8/-0
    • View Profile
Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
« Reply #1 on: March 16, 2021, 06:36:58 pm »
I had a similar problem after a upgrade from 6.2 to 7.0 aborted during the upgrade of Ubuntu from 18.04 to 20.04.

As a result, the release-upgrade script did not complete. That script has a line that creates a symlink between /bin/bash and /usr/bin/bash

https://github.com/zentyal/zentyal/blob/80eca4ab66374e2c7f662f9bd09dd1314dcacd8f/main/core/src/scripts/release-upgrade#L262

mscfw

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
« Reply #2 on: March 17, 2021, 10:12:30 am »
Thanks a lot, makes live easier. I'm not sure if I should do a fresh reinstall at the end of the day, a bit scared about moving the mailboxes and all the small extra settings collected over the last few years ...

mscfw

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
« Reply #3 on: March 17, 2021, 12:08:36 pm »
Quick Update:
  • The link does not solve the problem in my installation
  • Updating a second system ended in the same situation


Update to 7.0.3 also did not change anything.

Daniel Joven

  • Zentyal Staff
  • Zen Apprentice
  • *****
  • Posts: 45
  • Karma: +21/-0
    • View Profile
Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
« Reply #4 on: March 17, 2021, 12:38:37 pm »
Hi,

Quick Update:
  • The link does not solve the problem in my installation
  • Updating a second system ended in the same situation


Update to 7.0.3 also did not change anything.

The link that nickpiggott provided is correct, however, note that you need to run the next piece of code too, (the conditional of the line 265).

Also, do you remember if after the upgrade you had any broken package in your system? Which modules do you have installed? It seems that the script wasn't run the function 'postUpgradeProcedure' for some reason (probably broken packages).

mscfw

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
« Reply #5 on: March 17, 2021, 01:20:17 pm »
Hi Daniel,
I missed the additional lines - this is not 100% my world to be honest - but I'm always open to learn ;-).

To your questions:
the upgrade failed on both my systems with more or less similar "symtoms".
  • suricata repro has missing key
  • grub failed to probe devices (usual software raid-1 problem, easy to fix if do NOT reboot before running grub-install with working parameters!)
  • Zentyal repro without version
After fixing the grub and repro issues I reran the upgrade script, but I did not check if all modules are triggers. The zentyal update log is "clean". I missed saving the log after the first run, sorry.
I had no broken packages after the script finished, but I could see the corresponding message during the run (verbose mode)

System (1) has antivirus, audit, dns, firewall, ips, logs, mail, mailfilter, network, ntp, samba, sogo, webadmin installed, but audit and ips are actually not configured.

System (2) is a kind of BDC with only antivirus, audit, dns, firewall, logs, network, ntp, samba, webadmin installed, audit is also not active.

Does this help, or is information missing?

Thanks for your support,
bye
Markus

Laurent Dinclaux

  • Zen Monk
  • **
  • Posts: 83
  • Karma: +5/-0
    • View Profile
    • Gecka
Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
« Reply #6 on: April 13, 2021, 03:20:15 pm »
The best is to add
Code: [Select]
/usr/bin/bash to
Code: [Select]
/etc/shells.

I have just did an upgrade I saw errors about it but after upgrade finished
Code: [Select]
/usr/bin/bash is in
Code: [Select]
/etc/shells
But yeah upgrading to Zentyal 7.0 is a nightmare. I had to disable IPS or when it comes to suricata's upgrade, ssh access is dropped and after a reboot no more network access ... I also had the apt key missing during one of my upgrades attempts ...
Laurent