Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1503661

Summary: warning: group tomcat does not exist - using root
Product: Red Hat Enterprise Linux 7 Reporter: Sam Yangsao <syangsao>
Component: tomcatAssignee: Coty Sutherland <csutherl>
Status: CLOSED ERRATA QA Contact: Jan Onderka <jonderka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: csutherl, mbabacek, mczernek, syangsao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 18:33:14 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:

Description Sam Yangsao 2017-10-18 14:24:04 UTC
Description of problem:

Installation of Satellite 6.2 shows the following message when installing tomcat:

"warning: group tomcat does not exist - using root"

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

Red Hat Enterprise Linux 7.3
Satellite 6.2
tomcat-7.0.76-2.el7

How reproducible:

Always

Steps to Reproduce:

1.  Install RHEL 7.3
2.  Subscribe to the Satellite 6.2 channels [1]
3.  Start the Satellite installation [2]

[1] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.2/html-single/installation_guide/#installing_satellite_connected_parent
[2] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.2/html-single/installation_guide/#installing_satellite_server_install_guide

Actual results:

Installation gives the following message when installing tomcat:

<snip>

  Installing : katello-common-3.0.0-21.el7sat.noarch                    304/350
  Installing : libecap-1.0.0-1.el7.x86_64                               305/350
  Installing : syslinux-4.05-13.el7.x86_64                              306/350
  Installing : ipxe-bootimgs-20170123-1.git4e85b27.el7_4.1.noarch       307/350
  Installing : tfm-rubygem-foreman_bootdisk-6.1.0.4-1.el7sat.noarch     308/350
  Installing : tomcat-el-2.2-api-7.0.76-2.el7.noarch                    309/350
  Installing : tomcat-lib-7.0.76-2.el7.noarch                           310/350
  Installing : tomcat-7.0.76-2.el7.noarch                               311/350
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root

</snip>

Expected results:

The installation of tomcat should give a warning that there is an existing GID of 91 or fail the installation as the scriplet requires this GID number.

<snip>

old> rpm -q --scripts tomcat
preinstall scriptlet (using /bin/sh):
# add the tomcat user and group
/usr/sbin/groupadd -g 91 -r tomcat 2>/dev/null || :
/usr/sbin/useradd -c "Apache Tomcat" -u 91 -g tomcat \
    -s /sbin/nologin -r -d /usr/share/tomcat tomcat 2>/dev/null || :
postinstall scriptlet (using /bin/sh):
# install but don't activate

if [ $1 -eq 1 ] ; then
        # Initial installation
        systemctl preset tomcat.service >/dev/null 2>&1 || :
fi
preuninstall scriptlet (using /bin/sh):
# clean tempdir and workdir on removal or upgrade
/usr/bin/rm -rf /var/cache/tomcat/work/* /var/cache/tomcat/temp/*

if [ $1 -eq 0 ] ; then
        # Package removal, not upgrade
        systemctl --no-reload disable tomcat.service > /dev/null 2>&1 || :
        systemctl stop tomcat.service > /dev/null 2>&1 || :
fi
postuninstall scriptlet (using /bin/sh):

systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
        # Package upgrade, not uninstall
        systemctl try-restart tomcat.service >/dev/null 2>&1 || :
fi

</snip>

Additional info:

The issue is occurring due to an existing group id (GID) that is already configured on the local host or ldap that the host is connected to.

Comment 3 Jan Onderka 2017-10-24 10:41:56 UTC
Installation pass and install all packages, but we expecting install to fail.

this part is always pass even if group cannot be created due to || : in the end of the line.
preinstall scriptlet (using /bin/sh):
# add the tomcat user and group
/usr/sbin/groupadd -g 91 -r tomcat 2>/dev/null || :


Console output:
[root@dhcp-10-40-4-110 ~]# groupadd -g 91 test
[root@dhcp-10-40-4-110 ~]# yum install tomcat
Downloading packages:
(1/8): apache-commons-logging-1.1.2-7.el7.noarch.rpm                                                                                                                                                                   |  78 kB  00:00:00     
(2/8): avalon-framework-4.3-10.el7.noarch.rpm                                                                                                                                                                          |  87 kB  00:00:00     
(3/8): tomcat-7.0.76-2.el7.noarch.rpm                                                                                                                                                                                  |  90 kB  00:00:00     
(4/8): avalon-logkit-2.1-14.el7.noarch.rpm                                                                                                                                                                             |  87 kB  00:00:00     
(5/8): tomcat-jsp-2.2-api-7.0.76-2.el7.noarch.rpm                                                                                                                                                                      |  93 kB  00:00:00     
(6/8): tomcat-el-2.2-api-7.0.76-2.el7.noarch.rpm                                                                                                                                                                       |  79 kB  00:00:00     
(7/8): tomcat-servlet-3.0-api-7.0.76-2.el7.noarch.rpm                                                                                                                                                                  | 211 kB  00:00:00     
(8/8): tomcat-lib-7.0.76-2.el7.noarch.rpm                                                                                                                                                                              | 3.9 MB  00:00:00     
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         1.7 MB/s | 4.6 MB  00:00:02     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : tomcat-servlet-3.0-api-7.0.76-2.el7.noarch                                                                                                                                                                                 1/8 
  Installing : avalon-logkit-2.1-14.el7.noarch                                                                                                                                                                                            2/8 
  Installing : avalon-framework-4.3-10.el7.noarch                                                                                                                                                                                         3/8 
  Installing : apache-commons-logging-1.1.2-7.el7.noarch                                                                                                                                                                                  4/8 
  Installing : tomcat-jsp-2.2-api-7.0.76-2.el7.noarch                                                                                                                                                                                     5/8 
  Installing : tomcat-el-2.2-api-7.0.76-2.el7.noarch                                                                                                                                                                                      6/8 
  Installing : tomcat-lib-7.0.76-2.el7.noarch                                                                                                                                                                                             7/8 
  Installing : tomcat-7.0.76-2.el7.noarch                                                                                                                                                                                                 8/8 
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: group tomcat does not exist - using root
warning: user tomcat does not exist - using root
warning: user tomcat does not exist - using root
warning: group tomcat does not exist - using root
  Verifying  : apache-commons-logging-1.1.2-7.el7.noarch                                                                                                                                                                                  1/8 
  Verifying  : tomcat-servlet-3.0-api-7.0.76-2.el7.noarch                                                                                                                                                                                 2/8 
  Verifying  : tomcat-jsp-2.2-api-7.0.76-2.el7.noarch                                                                                                                                                                                     3/8 
  Verifying  : avalon-logkit-2.1-14.el7.noarch                                                                                                                                                                                            4/8 
  Verifying  : avalon-framework-4.3-10.el7.noarch                                                                                                                                                                                         5/8 
  Verifying  : tomcat-el-2.2-api-7.0.76-2.el7.noarch                                                                                                                                                                                      6/8 
  Verifying  : tomcat-lib-7.0.76-2.el7.noarch                                                                                                                                                                                             7/8 
  Verifying  : tomcat-7.0.76-2.el7.noarch                                                                                                                                                                                                 8/8 

Installed:
  tomcat.noarch 0:7.0.76-2.el7                                                                                                                                                                                                                

Dependency Installed:
  apache-commons-logging.noarch 0:1.1.2-7.el7   avalon-framework.noarch 0:4.3-10.el7  avalon-logkit.noarch 0:2.1-14.el7  tomcat-el-2.2-api.noarch 0:7.0.76-2.el7  tomcat-jsp-2.2-api.noarch 0:7.0.76-2.el7  tomcat-lib.noarch 0:7.0.76-2.el7 
  tomcat-servlet-3.0-api.noarch 0:7.0.76-2.el7 

Complete!
[root@dhcp-10-40-4-110 ~]# rpm -qa tomcat*
tomcat-lib-7.0.76-2.el7.noarch
tomcat-servlet-3.0-api-7.0.76-2.el7.noarch
tomcat-jsp-2.2-api-7.0.76-2.el7.noarch
tomcat-7.0.76-2.el7.noarch
tomcat-el-2.2-api-7.0.76-2.el7.noarch

Comment 5 Coty Sutherland 2017-11-07 17:39:31 UTC
To easily reproduce this you can just manually create a user/group that takes uid/gid 91 and then try and install tomcat (Satellite isn't required).

Comment 18 errata-xmlrpc 2018-04-10 18:33:14 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-2018:0992