Issues with dedicated operating system user account creation during Confluence installation
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The installer is creating a user account with a name as confluenceX(X being numeric) instead of confluence even on the first attempt.
Environment
7.4.7.
Diagnosis
There is a feature request CONFSERVER-58251 - Installer creates multiple users in OS each time it is executed logged where it has been noted that as a part of the installation, the installer will try to create a new user each time it is invoked on the same OS. It is because of this reason the installer can come up with a user name different from confluence i.e confluence1, confluence 2, and so on. There can be a scenario where though installer has been invoked for the first time but still it would create the first user as confluenceX(X being in numeric value such as 1,2 or more) instead of confluence. There are no entries under /etc/passwd with name confluence on Linux-based systems but somehow installer still creates the user with a name as confluenceX.
Cause
This can happen if a system has been configured to look for user account externally as a part of the system setup. For example on a Linux system, nsswitch.conf file would contain the respective configuration for checking the order in which user account information can be searched. Below is the quick snippet of this -
passwd: files sss
Based on the above configuration, if the information about the user is requested, then the system will first try to search it under /etc/passwd. In case it could not get the required information under /etc/passwd, it will try to search for this information under sssd cache and on the server providing authentication. For the Red Hat Linux variant, you might want to review the link https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_authentication_and_authorization_in_rhel/index that provides more details around the respective files that might come into play for configuring external authentication. Based on Operating System being used, the setup and respective files may vary slightly and so we would recommend that you review the documentation of you respective OS around this.
To verify if the user "confluence" exists under the internal or external directory, below command can be used on Linux systems-
getent passwd confluence
In the case above command comes up with some results, then that would confirm that the "confluence" user is being picked up from the external authentication source. Due to this, when the installer is triggered for the first time, it still created a user "confluence1" even though none was visible under /etc/passwd file on the system.
Solution
There should not be an issue with using confluenceX as a user for confluence but in case there is a specific requirement for using only "confluence" user(Eg - some external system is picking files from your system from a particular directory based on the ownership of files being "confluence"), then we would recommend that you look for the possibility of removing the user "confluence" from the external authentication source before triggering the installer.