Problem:When running the Centrify DB2 plugin setup script, setupdb2.sh, it fails with the following error:
"The target instance must be entered before the command!"
Cause:The Centrify DB2 plugin setup script runs as root, but as the script runs it calls a function that uses "su" to run commands as the db2 instance owner.
If the login shell of the db2 instance owner is ksh instead of bash or sh, then the DB2 environment will be missing and DB2INSTANCE will be empty. As a result, the script will fail.
[root@rhel65 ~]# grep db2inst1 /etc/passwd
db2inst1:x:508:102::/home/db2inst1:/bin/ksh
Workaround:The instance owners shell can be temporarily changed to bash or sh, so that the db2 plugin setup script will complete successfully.
For example, on a RHEL based system, the usermod command can be used to change the shell from /bin/ksh to /bin/bash
[root@rhel65 ~]# usermod -s /bin/bash db2inst1
[root@rhel65 ~]# grep db2inst1 /etc/passwd
db2inst1:x:508:102::/home/db2inst1:/bin/bash
After the install of plugins completes, the login shell can be changed back to ksh.
Resolution:This will be fixed in the Centrify Infrastructure Services 2020 release.