Red Hat Bugzilla – Bug 6733
chsh accepts / and exits with 0
Last modified: 2008-05-01 11:37:52 EDT
Changing shell for root.
New shell [/bin/ksh]: /
Warning: "/" is not listed in /etc/shells
superbox:/root>grep root /etc/passwd
/root:x:0:0:root:/root:/ <----- ouch!
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.