Bug 6733 - chsh accepts / and exits with 0
chsh accepts / and exits with 0
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: util-linux (Show other bugs)
6.1
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Crutcher Dunnavant
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-11-04 17:23 EST by zeek
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-11-04 17:34:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description zeek 1999-11-04 17:23:15 EST
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 17:34:59 EST
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.