Bug 107223 - chsh does not assign /bin/sh as shell
chsh does not assign /bin/sh as shell
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: util-linux (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2003-10-15 18:32 EDT by Chris Van Hoof
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-10-28 09:17:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chris Van Hoof 2003-10-15 18:32:41 EDT
Description of problem:
When using chsh to change a users shell to /bin/sh, in this case root nothing is
assigned.  I can reproduce this on all RHL 7.x, 8, 9 and RHEL 2.1

This is not reproducable on Fedora Core or the Beta release for RHEL

Version-Release number of selected component (if applicable):

util-linux-2.11f-20 ; RHEL
util-linux-2.11y-9 ; RHL9

How reproducible:

Easily Reproduced:

[root@crashtestdummy root]# echo $SHELL
[root@crashtestdummy root]# chsh
Changing shell for root.
New shell [/bin/bash]: /bin/sh
Shell changed.
[root@crashtestdummy root]# finger root
Login: root                             Name: root
Directory: /root                        Shell: /bin/sh
On since Wed Oct 15 11:23 (EDT) on tty1    3 minutes 42 seconds idle
On since Wed Oct 15 11:30 (EDT) on pts/0 from unplugged.rdu.redhat.com
Mail forwarded to vanhoof
New mail received Mon Oct 13 04:06 2003 (EDT)
     Unread since Fri Sep 26 13:33 2003 (EDT)
No Plan.
[root@crashtestdummy root]# grep ^root /etc/passwd

[root@crashtestdummy root]# chsh
Changing shell for root.
New shell [/bin/sh]: /bin/bash
Shell changed.
[root@crashtestdummy root]# grep ^root /etc/passwd
[root@crashtestdummy root]#

Steps to Reproduce:
1. As root run chsh and select /bin/sh as shell
2. Look at entry in /etc/passwd for shell
3. Attempt a login
Actual results:

Login attempts fail

Expected results:

Shell changed to /bin/sh

Additional info:

Any other shell ( ksh, zsh, tcsh ) all change fine with chsh
Comment 1 Elliot Lee 2003-10-28 09:17:09 EST
Login treats an empty shell field as /bin/sh, so all is well. I think this is
intentional behaviour by chsh.

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