GEN002120 - The /etc/shells (or equivalent) file must exist.

Information

The shells file (or equivalent) lists approved default shells. It helps provide layered defense to the security approach by ensuring users cannot change their default shell to an unauthorized shell that may not be secure.

Solution

Create a /etc/shells file containing a list of valid system shells. The list below contains the default shells from the shells(4) man page.

Procedure (the command is 24 lines long):
cat >/etc/shells <<EOF
/bin/bash
/bin/csh
/bin/jsh
/bin/ksh
/bin/pfcsh
/bin/pfksh
/bin/pfsh
/bin/sh
/bin/tcsh
/bin/zsh
/sbin/jsh
/sbin/sh
/usr/bin/bash
/usr/bin/csh
/usr/bin/jsh
/usr/bin/ksh
/usr/bin/pfcsh
/usr/bin/pfksh
/usr/bin/pfsh
/usr/bin/sh
/usr/bin/tcsh
/usr/bin/zsh
EOF

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_SOL_10_x86_V2R4_STIG.zip

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b., CAT|II, CCI|CCI-000366, Rule-ID|SV-227692r603266_rule, STIG-ID|GEN002120, STIG-Legacy|SV-40806, STIG-Legacy|V-916, Vuln-ID|V-227692

Plugin: Unix

Control ID: 578bb07cd5dc72644d0d1da883d7732791b55b498184ba4f59f23688258a4d2a