Bug 785836 - chsh wrongly complain that shell is not in /etc/shells
Summary: chsh wrongly complain that shell is not in /etc/shells
Keywords:
Status: CLOSED DUPLICATE of bug 752827
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Roman Rakus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-30 18:31 UTC by Michel Lind
Modified: 2014-01-13 00:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-29 14:28:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.