Bug 1277197

Summary: tomcat user has non-existing default shell set
Product: Red Hat Enterprise Linux 7 Reporter: Marek Haicman <mhaicman>
Component: tomcatAssignee: Coty Sutherland <csutherl>
Status: CLOSED ERRATA QA Contact: fgoldefu
Severity: low Docs Contact: Lenka Špačková <lkuprova>
Priority: low    
Version: 7.2CC: asakure, bugzilla, jonderka, jstourac, mbabacek, nkinder, rhatlapa
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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`.
Story Points: ---
Clone Of:
: 1386238 (view as bug list) Environment:
Last Closed: 2016-11-03 21:09:33 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:    
Bug Blocks: 1298191, 1313485, 1386238    

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):
tomcat-7.0.54-2.el7_1

How reproducible:
reliably

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


Actual results:
/bin/nologin

Expected results:
/sbin/nologin

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.

https://rhn.redhat.com/errata/RHSA-2016-2599.html