Information
The NGINX service account must be configured with an invalid login shell to prevent interactive access.
The NGINX service account is strictly for running daemon processes. Assigning it a valid login shell (like /bin/bash ) unnecessarily expands the attack surface. If an attacker compromises the account credentials (or adds an SSH key), a valid shell facilitates interactive system access. Setting the shell to /sbin/nologin or /bin/false ensures that even with valid credentials, the system immediately rejects a login attempt.
Solution
Change the login shell for the identified user to /sbin/nologin :
usermod -s /sbin/nologin nginx
(Replace nginx with the actual user)
Impact:
None. Service accounts do not require interactive login capabilities for normal operation.