Bug 1752493

Summary: GDM does not prevent users with login shell /sbin/nologin from logging on [rhel-8.1.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: Oneata Mircea Teodor <toneata>
Component: gdmAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: cww, dchen, desktop-qa-list, hdegoede, jkoten, mboisver, rstrode, sfroemer, tpelka
Target Milestone: rcKeywords: ZStream
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnome-session-3.28.1-7.el8_1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1745147 Environment:
Last Closed: 2019-12-17 10:47:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1745147, 2015519    
Bug Blocks:    

Description Oneata Mircea Teodor 2019-09-16 12:50:16 UTC
+++ This bug was initially created as a clone of Bug #1745147 +++

Description of problem:
A user with login-shell set to /sbin/nologin is still able to login using GDM

Version-Release number of selected component (if applicable):
gdm-3.28.3-20.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. RHEL 8
2. useradd -s /sbin/nologin -m user2
3. login via GDM

Actual results:
The user is able to login

Expected results:
The user should not be able to login

Additional info:
# grep user2 /etc/passwd
user2:x:1001:1001::/home/user2:/sbin/nologin

# w
 17:39:27 up 30 min,  2 users,  load average: 0,80, 0,17, 0,07
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    172.16.100.100   17:09    1.00s  0.11s  0.01s w
user2    :1       :1               17:39   ?xdm?  16.42s  0.02s /usr/libexec/gdm-x-session gnome-session

# su - user2
Last login: Fr Aug 23 17:39:24 UTC 2019 on tty2
This account is currently not available.

--- Additional comment from Ding-Yi Chen on 2019-09-13 03:33:44 UTC ---

I can reproduce it with gdm-3.28-3-20.el8.x86_64

Comment 3 Michael Boisvert 2019-11-27 15:38:16 UTC
I am no longer able to reproduce this issue on gnome-session-3.28.1-7.el8_1.

Comment 5 errata-xmlrpc 2019-12-17 10:47:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4267