Red Hat Bugzilla – Bug 753780
Include common shells into default /etc/shells
Last modified: 2011-11-15 12:38:28 EST
Description of problem:
I upgraded from Fedora 15 to Fedora 16 using preupgrade. After it seemed to be running well, I tried to start VirtualBox. It said the kernel module was missing, so I took care of that. Afterward, it complained about lacking the extensions so I went to install that but got a message:
ExtPackInst ExtPack: enmReason=1 iStatus=127 stderr='The value for the SHELL
variable was not found the /etc/shells file
I looked at the /etc/shells file, and found that there were two entries for /bin/dash but no entry for /bin/bash. I changed the first instance to /bin/bash, and that fixed it. I entered this in bug report #706147, and was told that this should be filed against setup.
Version-Release number of selected component (if applicable):
Once fixed by changing one of the /bin/dash entries to /bin/bash, the problem disappears. I suppose if I were to install F16 again, the problem would crop up, but I don't wish to reinstall F15 in order to upgrade it again to verify this.
Steps to Reproduce:
1. Have working F15 setup
2. using preupgrade, upgrade to F16
3. Attempt to run VirtualBox, which ran fine before upgrading.
Get message about the SHELL variable not found in /etc/shells file
When upgrading, setup should ensure that /bin/bash is left in place in /etc/shells
Additional info: Linux xxxxxxxx.yyyyyyyy 3.1.1-1.fc16.x86_64 #1 SMP Fri Nov 11 21:47:56 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
This exists also on my netbook, also running F16 x86_64 which was upgraded via preupgrade. It has fewer entries, but also has /bin/dash twice and is missing /bin/bash. I have fixed this on it as well, so this seems to indicate that this is not a problem unique to one machine.
This is the /etc/shells file from my desktop machine. as it was before I modified it.
This is the file after I modified it.
It seems like bash-4.2.10-5.fc16.x86_64 update removed the /bin/bash record on my system.
I agree with Ondrej's (bug 706147, comment #7) idea to include all shells in the file by default.
Anyway - ensuring after setup update is generally not possible - I can use only lua scriptlet in setup post/postun (and with lua that could be quite hard to achieve). In addition, I can't prevent breakage/modifications by users/other packages after setup update.
Adding some(all of known) new shells probably makes sense, I'll check the other shell packages and way how they add their shell to /etc/shells file.
Adding Bash maintainer to cc, as he probably removed the shell by accident (based on comment #1)
It was bug in previous version of bash. There is newer one. However the bug is in postun scriptlet, it means, you need to upgrade twice (or upgrade and reinstall).
Double /bin/dash is bug in dash package
Setup package should check all installed shells and entries in /etc/shells? It's nonsense.
I would close this bug as duplicate of bug #752827.
Thanks for information, Roman. This bugzilla was initiated by dash bugzilla #706147 and was more about including more shells into default /etc/shells (summary changed) - it probably makes sense to include all common shells there and don't touch /etc/shells from the shells packages.
Double /bin/dash and missing /bin/bash are definitely duplicates of existing bugzillas, but with this summary this bugzilla could be kept open.
(In reply to comment #5)
> Double /bin/dash is bug in dash package
Could you elaborate on that? Indeed it would be weird if some other package caused that but the only thing dash has been doing in past two Fedora releases is this:
grep -qF '^/bin/dash$' /etc/shells || echo '/bin/dash' >> /etc/shells
if [ $1 -eq 0 ]; then
sed -i '/^\/bin\/dash$/d' /etc/shells
Maybe I'm just missing obvious...
Ah, bug 753887 explains that. Never mind then :)
Although this report refers to upgrade from f15 to f16 - I have a new fresh install of f16 x86_64 and up to date as of this morning.
My /etc/shells contains:
I am really surprised that there is no bash or other common shells.
In fact I checked with an f14 machine where the contents are:
Clearly something is missing - and maybe the error is somewhere other than the bash update?
Well, it was really bug in bash, but bug in %postun scriptlet of old bash means you need two updates to get it fixed ... yum reinstall bash will fix your problem...
In addition, after thinking a bit more about this idea of including all common shells into /etc/shells I think it would only cause confusion ... handling it in shell packages is much better - but it has a risk of such issues like the current one with bash update...
Anyway closing this as not a bug (as I'm not going to add additional shells to default /etc/shells) ...
OK you are right -
yum reinstall bash
Once done, then the VirtualBox extensions pack installed without issue - but knowing what was needed was important! Hence this was a useful report even if no change to any packages was needed.
Yes, but I changed the summary of this bugzilla to be about something else than "/bin/bash" missing ... There are already several "/bin/bash missing in /etc/shells" bugzillas, so that would be a duplicate in that case.