Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: mscfw on March 15, 2021, 09:31:22 am

Title: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
Post by: mscfw on March 15, 2021, 09:31:22 am
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
Title: Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
Post by: nickpiggott 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
Title: Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
Post by: mscfw 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 ...
Title: Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
Post by: mscfw on March 17, 2021, 12:08:36 pm
Quick Update:


Update to 7.0.3 also did not change anything.
Title: Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
Post by: Daniel Joven 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).
Title: Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
Post by: mscfw 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".
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
Title: Re: Zentyal 7: Invalid value for Default login shell: /usr/bin/bash ...
Post by: Laurent Dinclaux 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 ...