Bug 785836

Summary: chsh wrongly complain that shell is not in /etc/shells
Product: [Fedora] Fedora Reporter: Michel Lind <michel>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: maxamillion, rrakus, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-29 14:28:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michel Lind 2012-01-30 18:31:51 UTC
Description of problem:
On a fresh install, trying to use chsh to switch to the any other shell -- e.g. using 'chsh -s /bin/zsh' fails, with a message that the selected shell is not in /etc/shells.

As it turns out, on a fresh installation /bin/bash is *not* in /etc/shells.
The problem seems to go away as soon as bash is reinstalled/upgraded; I seem to remember seeing this on my F16 box too but now chsh works fine there.

Version-Release number of selected component (if applicable):
util-linux-2.20.1-5.fc17.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install a new system (from live CD)
2. cat /etc/shells
3. chsh -s /bin/dash
4. yum reinstall bash
5. cat /etc/shells
6. chsh -s /bin/dash
  
Actual results:
step 2 =>
/sbin/nologin
/bin/dash
/bin/zsh     # I have zsh installed

step 3 =>
Can't change shell:
chsh: chsh: your shell is not in /etc/shells, shell change denied: Permission denied

for steps 5 & 6, see expected results

Expected results:
step 5 => these two lines are added at the end of /etc/shells

/bin/sh
/bin/bash

step 6 => works

Additional info:
On this particular system, I have upgraded to Rawhide after installing from the Fedora 16 live CD, so really, bash has been upgraded and the %post steps should have been run. No idea why either on F-16 + updates, or F-16 upgraded to Rawhide (in this case, Rawhide's usr-move repo) bash still does not register itself in /etc/shells.

Comment 1 Michel Lind 2012-01-30 18:33:49 UTC
correction: package affected is
bash-4.2.20-4.fc17.x86_64

Comment 2 Roman Rakus 2012-02-29 14:28:31 UTC

*** This bug has been marked as a duplicate of bug 752827 ***