diff --git a/ipaplatform/base/constants.py b/ipaplatform/base/constants.py index e5bda432ee3..5bbed240e75 100644 --- a/ipaplatform/base/constants.py +++ b/ipaplatform/base/constants.py @@ -15,6 +15,7 @@ class BaseConstantsNamespace: HTTPD_USER = "apache" HTTPD_GROUP = "apache" GSSPROXY_USER = "root" + IPA_ADTRUST_PACKAGE_NAME = "freeipa-server-trust-ad" IPA_DNS_PACKAGE_NAME = "freeipa-server-dns" KDCPROXY_USER = "kdcproxy" NAMED_USER = "named" diff --git a/ipaplatform/rhel/constants.py b/ipaplatform/rhel/constants.py index 945f3dca358..72335ac68d8 100644 --- a/ipaplatform/rhel/constants.py +++ b/ipaplatform/rhel/constants.py @@ -13,6 +13,7 @@ class RHELConstantsNamespace(RedHatConstantsNamespace): + IPA_ADTRUST_PACKAGE_NAME = "ipa-server-trust-ad" IPA_DNS_PACKAGE_NAME = "ipa-server-dns" constants = RHELConstantsNamespace() diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py index da16748cfa9..4b89ba83569 100644 --- a/ipaserver/install/adtrustinstance.py +++ b/ipaserver/install/adtrustinstance.py @@ -72,6 +72,15 @@ def check_inst(): "start the installation again") return False + # Check that ipa-server-trust-ad package is installed, + # by looking for the file /usr/share/ipa/smb.conf.empty + if not os.path.exists(os.path.join(paths.USR_SHARE_IPA_DIR, + "smb.conf.empty")): + print("AD Trust requires the '%s' package" % + constants.IPA_ADTRUST_PACKAGE_NAME) + print("Please install the package and start the installation again") + return False + #TODO: Add check for needed samba4 libraries return True