Hide Forgot
+++ This bug was initially created as a clone of Bug #706138 +++ Description of problem: Users can't use dash as their shell since it's not present in the /etc/shells file. Version-Release number of selected component (if applicable): 0.5.6-3 How reproducible: Always. Steps to Reproduce: 1. Install dash. 2. Try to set dash as your shell (e.g. via chsh) Actual results: chsh: "/bin/dash" is not listed in /etc/shells. Expected results: Shell changed. Additional info: This can be solved via %post and %postun scriptlets. --- Additional comment from psabata on 2011-05-19 17:30:06 CEST --- %post if [ $1 -eq 1 ]; then grep -qF /bin/dash /etc/shells || echo '/bin/dash' >> /etc/shells fi %postun if [ $1 -eq 0 ]; then sed -i '/\/bin\/dash/d' /etc/shells fi
Fixed in Fedora already (0.5.6-4 in f15+, 0.5.6-3 in f14).
Possibly in fixing this problem another was introduced. I just upgraded from Fedora 15 to Fedora 16 using preupgrade. I went to start a VirtualBox session, and it complained that it could not do so. This was the error 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 /bin/bash was missing. However, /bin/dash was in the file twice. Once I changed the first instance to /bin/bash, VirtualBox behaved fine. Please check the file as I am sure that it may be causing problems to others. I had not previously had any problem with this, so it had to have come in with the F16 upgrade.
Stephen, this is not a Fedora bug, I suppose you wanted to comment on 706138. Anyway, /bin/dash was added to /etc/shells in F14 and doesn't touch /bin/bash record (or any other) at all. All that is handled in dash %post and %postun scriptlets. I also don't have /etc/bash in /etc/shells but I have /etc/dash there just once. The file belongs to the 'setup' package. Please, file a bug report with it. What is also weird is bash users can login into the system although the record is missing...
Default /etc/shells from setup contains just: /bin/sh /bin/bash /sbin/nologin The rest of the shells is added by other packages. It would probably make sense to add the additional shells /bin/tcsh /bin/csh /bin/ksh /bin/zsh /bin/dash and maybe others to the default /etc/shells file - as I don't like modifications of default system files by other packages...
Thanks. Done. Bug is 753780.
Interesting though, the /etc/shells on my netbook contained just /sbin/nologin /bin/dash /bin/dash No /bin/sh or any other entry. The desktop, before I fixed it contained: /sbin/nologin /bin/dash /bin/zsh /bin/ksh /bin/dash I changed the first /bin/dash to /bin/bash. This information was submitted as part of 753780, so I hope to see this fixed quickly.
Both bash and dash should be fixed (in Fedora) now.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-1381.html