Bug 963128 - System user (apache/tomcat) shouldn't be created with home directory set
System user (apache/tomcat) shouldn't be created with home directory set
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: doc-Installation-Guide (Show other bugs)
2.0.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 2.0.1
Assigned To: Misha H. Ali
Libor Fuka
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-15 04:03 EDT by Radim Hatlapatka
Modified: 2014-01-03 07:58 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-03 07:58:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Radim Hatlapatka 2013-05-15 04:03:49 EDT
System user such as apache or tomcat doesn't use home directory, therefore when creating them the option -d <homeDir> shouldn't be provided

This occurs on several places:
Procedure 2.13. Running Tomcat on Red Hat Enterprise Linux
2.4.6. Running the HTTP Server
Procedure 2.6. Creating tomcat User
Procedure 2.7. Setting the apache User
Comment 1 Misha H. Ali 2013-06-03 00:40:43 EDT
Developing for 2.0.1.
Comment 2 Misha H. Ali 2013-06-03 00:53:18 EDT
Applied fix to:

* Procedure 2.13. Running Tomcat on Red Hat Enterprise Linux
   - Step 2: Changed "/useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r -d /home/tomcat tomcat" to "useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcat"

* 2.4.6. Running the HTTP Server (is now 2.6.14. Running the HTTP Server)
  - Changed "/usr/sbin/useradd -c "Apache" -u 48 \ -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :" to "/usr/sbin/useradd -c "Apache" -u 48 \ -s /sbin/nologin -r apache 2> /dev/null || :"

* Procedure 2.6. Creating tomcat User (is now 2.6.8. Create a Tomcat User (ZIP and RPM))
  - Edited step 3. Changed "# useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r -d /home/tomcat tomcat" to "# useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcat"

Procedure 2.7. Setting the apache User (Is now 2.6.9. Set the apache User (ZIP and RPM))
  - Changed step 2. Changed "# useradd -c "Apache" -u 48 -g apache -s /bin/sh -r -d /home/apache apache" to "# useradd -c "Apache" -u 48 -g apache -s /bin/sh -r apache"

Links will be provided to these changes once this document appears on the stage.
Comment 3 Misha H. Ali 2013-06-04 01:50:52 EDT
Verification links for each change added inline:

(In reply to Misha H. Ali from comment #2)
> Applied fix to:
> 
> * Procedure 2.13. Running Tomcat on Red Hat Enterprise Linux
>    - Step 2: Changed "/useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r -d
> /home/tomcat tomcat" to "useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r
> tomcat"

http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/2/html/Installation_Guide/Running_Tomcat1.html 

> * 2.4.6. Running the HTTP Server (is now 2.6.14. Running the HTTP Server)
>   - Changed "/usr/sbin/useradd -c "Apache" -u 48 \ -s /sbin/nologin -r -d
> %{contentdir} apache 2> /dev/null || :" to "/usr/sbin/useradd -c "Apache" -u
> 48 \ -s /sbin/nologin -r apache 2> /dev/null || :"

http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/2/html/Installation_Guide/Running_the_HTTP_Server.html
 
> * Procedure 2.6. Creating tomcat User (is now 2.6.8. Create a Tomcat User
> (ZIP and RPM))
>   - Edited step 3. Changed "# useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh
> -r -d /home/tomcat tomcat" to "# useradd -c "Tomcat" -u 91 -g tomcat -s
> /bin/sh -r tomcat"

http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/2/html/Installation_Guide/Create_a_Tomcat_User_ZIP_RPM.html

> Procedure 2.7. Setting the apache User (Is now 2.6.9. Set the apache User
> (ZIP and RPM))
>   - Changed step 2. Changed "# useradd -c "Apache" -u 48 -g apache -s
> /bin/sh -r -d /home/apache apache" to "# useradd -c "Apache" -u 48 -g apache
> -s /bin/sh -r apache"

http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/2/html/Installation_Guide/Set_the_apache_User_ZIP_RPM.html
Comment 4 Misha H. Ali 2013-06-05 05:44:30 EDT
Changes applied to:

* Procedure 2.7. Creating tomcat User
* Procedure 2.8. Setting the apache User
* Procedure 2.14. Running Tomcat on Red Hat Enterprise Linux
Comment 5 Libor Fuka 2013-06-05 09:41:45 EDT
verified on http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/2/html-single/Installation_Guide/index.html#running_tomcat-ZIP

* Procedure 2.7. Creating tomcat User
* Procedure 2.8. Setting the apache User
* Procedure 2.14. Running Tomcat on Red Hat Enterprise Linux

-d /home/... option removed

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