After having installed the Policy Server and CA Directory on the same Linux machine, how to change the user from root to a different user without uninstalling and installing again?
From the documentation, it's advised to create the user "smuser", and to change the files within the installation folder to that user (1).
As per best practice, use a different user for the AdminUI. By default, the AdminUI installation path is within the Policy Server file tree:
/{home_policy_server}/adminui/
The main problem with the Policy Server and AdminUI is the java version in use. The AdminUI runs its own JVM, when the Policy Server runs another one, which one is determined at the installation phase, and has a different installation path.
So, when starting the AdminUI, the process shouldn't have the Policy Server environment variables set, as there will be a mix in the JVM classes and version. This will prevent the AdminUI to work properly.
The changes of the file ownership don't need the re-registration of the AdminUI.
More, having started once the Policy Server as root, ensure that those files are changed to the new owner, if they still exist in /tmp folder:
/tmp/snrrpni {{ pip
/tmp/GCL-SiteMinder.sem
/tmp/GCL-SiteMinder-B.pipe
/tmp/GCL-SiteMinder-A.pipe
Finally, the default "dsa" account gets created by the installer in the /etc/passwd file on Linux system, when installing the CA Directory (2).
And by default, when installing the CA Directory using rpm method, the user dsa gets created and files are set with the ownership to this user. The group etrdir is also created, and files are set to this group (3).
After having installed CA Directory with rpm, here are the permission set:
/{home_CA_Directory}:
drwxr-xr-x 12 dsa etrdir 244 06-17 10:57 dxserver
/{home_CA_Directory}/dxserver:
-rw------- 1 dsa etrdir 20633 06-17 10:57 .bash_history
-rw-r----- 1 dsa etrdir 48 2021-01-15 .bash_profile
drwxr-xr-x 2 dsa etrdir 4096 06-05 10:35 bin
drwx------ 2 dsa etrdir 6 2021-01-15 .cache
drwxr-xr-x 12 dsa etrdir 4096 2021-01-15 config
drwx------ 3 dsa etrdir 20 2023-06-16 .config
-rw-r----- 1 dsa etrdir 51 2021-01-15 .cshrc
drwxr-xr-x 2 dsa etrdir 4096 06-05 10:34 data
drwxr-xr-x 2 dsa etrdir 115 2022-06-13 install
drwxr-xr-x 3 dsa etrdir 19 2021-01-15 lib
drwxr-xr-x 2 dsa etrdir 8192 06-17 10:57 logs
drwxr-xr-x 2 dsa etrdir 4096 06-17 10:57 pid
-rw-r----- 1 dsa etrdir 48 2021-01-15 .profile
-rw------- 1 dsa etrdir 33 2022-11-11 .sh_history