Bug 6733 - chsh accepts / and exits with 0
Summary: chsh accepts / and exits with 0
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux
Version: 6.1
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-11-04 22:23 UTC by zeek
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-11-04 22:34:16 UTC
Embargoed:


Attachments (Terms of Use)

Description zeek 1999-11-04 22:23:15 UTC
superbox:/root>chsh
Changing shell for root.
New shell [/bin/ksh]: /
Warning: "/" is not listed in /etc/shells
Shell changed.
superbox:/root>echo $?
0
superbox:/root>grep root /etc/passwd
/root:x:0:0:root:/root:/	<----- ouch!
operator:x:11:0:operator:/root:etc/passwd

Comment 1 Bill Nottingham 1999-11-04 22:34:59 UTC
chsh will accept whatever root tells it.
It's allowing you to shoot yourself in the foot.

chsh for normal users does limit them to /etc/shells.


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