Red Hat Bugzilla – Bug 1571094
CVE-2018-1113 setup: nologin listed in /etc/shells violates security expectations
Last modified: 2018-10-30 03:53:20 EDT
setup in Fedora and Red Hat Enterprise Linux added /sbin/nologin and /usr/sbin/nologin to /etc/shells. This violates security assumptions made by pam_shells and some daemons which allow access based on a user's shell being listed in /etc/shells. Under some circumstances, users which had their shell changed to /sbin/nologin could still access the system. Note that SELinux and gdm (and probably others) have special-case workarounds for this issue. Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1378893 Prior discussions: - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/UCUWTT63JS72R7ROFE46ZVUZLFN3K2MZ/#UCUWTT63JS72R7ROFE46ZVUZLFN3K2MZ - https://www.redhat.com/archives/fedora-maintainers/2007-May/msg00887.html
Created setup tracking bugs for this issue: Affects: fedora-all [bug 1571103]
Statement: Preventing a user from accessing the system without deleting their account is not a simple matter. For utmost security, the account should be deleted. Short of this, we recommend a three-pronged approach: * change the user's login shell to a harmless command that is not in "/etc/shells" (for example "/bin/false") to prevent commands being run on their behalf * lock the user's password with "usermod -L" to prevent authentication with pam services * prevent access to the user's home directory with "chmod 0" or "chown root" and "chmod 700" to prevent authentication with ssh keys etc
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2018:3249 https://access.redhat.com/errata/RHSA-2018:3249