Bug 1277197 - tomcat user has non-existing default shell set
Summary: tomcat user has non-existing default shell set
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tomcat
Version: 7.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Coty Sutherland
QA Contact: fgoldefu
Lenka Špačková
: 1315858 1343207 1365885 (view as bug list)
Depends On:
Blocks: 1313485 1298191 1386238
TreeView+ depends on / blocked
Reported: 2015-11-02 16:18 UTC by Marek Haicman
Modified: 2019-10-10 10:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Newly installed _tomcat_ package has a correct shell pointing to `/sbin/nologin` Previously, the postinstall script set the Tomcat shell to `/bin/nologin`, which does not exist. Consequently, users failed to get a helpful message about the login access denial when attempting to log in as Tomcat user. This bug has been fixed, and the postinstall script now corectly sets the Tomcat shell to `/sbin/nologin`.
Clone Of:
: 1386238 (view as bug list)
Last Closed: 2016-11-03 21:09:33 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1302718 0 unspecified CLOSED user 'tomcat': program '/bin/nologin' does not exist 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2016:2599 0 normal SHIPPED_LIVE Moderate: tomcat security, bug fix, and enhancement update 2016-11-03 12:12:12 UTC

Description Marek Haicman 2015-11-02 16:18:58 UTC
Description of problem:
Default shell for tomcat user is set as /bin/nologin. This binary is not present on RHEL machines, there is /sbin/nologin or /usr/sbin/nologin

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install tomcat (or whichever package creates the user)
2. getent passwd tomcat | cut -d: -f7

Actual results:

Expected results:

Comment 1 Michal Karm Babacek 2015-11-03 11:09:59 UTC
@Jan Stourac: Are we affected in JWS?

Comment 2 Jan Stourac 2015-11-24 07:14:26 UTC
@Michal: I've just checked - JWS is safe using /sbin/nologin executable when creating a new user (both for Tomcat 7 and Tomcat 8).

Comment 3 Coty Sutherland 2016-03-08 19:24:09 UTC
*** Bug 1315858 has been marked as a duplicate of this bug. ***

Comment 5 Coty Sutherland 2016-06-06 20:33:19 UTC
*** Bug 1343207 has been marked as a duplicate of this bug. ***

Comment 9 Coty Sutherland 2016-08-10 12:20:01 UTC
*** Bug 1365885 has been marked as a duplicate of this bug. ***

Comment 10 Jan Onderka 2016-10-17 14:36:59 UTC
Change doesn't take effect if <tomcat> user is already created by preview RPMs. There should be test if <tomcat> user exists and if so <usermod -s /sbin/nologin tomcat> should be used.

Comment 11 Jan Onderka 2016-10-18 13:10:04 UTC
1386238 follow up issue

Comment 15 errata-xmlrpc 2016-11-03 21:09:33 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.


Note You need to log in before you can comment on or make changes to this bug.