VMware Cloud Community
hkessock
Contributor
Contributor

installer_is_root_install never has a value other than '0' on macOS

<showText text="You are not administrator!">
  <ruleList>
    <isFalse value="${installer_is_root_install}"/>
  </ruleList>
</showText>

 Trying to determine whether or not the installer is being run with the required permissions on macOS (and I am not allowed to force the credentials by using 'requireInstallationByRootUser' for reasons outside the scope of this discussion.

If I launch the installer app with sudo (e.g. 'sudo open...') the value is 0.

If sudo -i and become root in my shell and then open the app the value is 0.

If I do both approaches and run the Contents/MacOS binary directly, the value is 0.

0 Kudos
3 Replies
michieldhont_
Hot Shot
Hot Shot

Hi @hkessock,

Using "sudo open" won't open the application with administrator privileges. This applies for all applications opened in that way. However if you open the installer with "sudo installer.app/Content/MacOS/installbuilder.sh it should open as administrator.

Best regards,

Michiel

0 Kudos
hkessock
Contributor
Contributor

It does, but the uninstaller will fail to initialize when run in the future unless run from the terminal with 'sudo' as well.

There seems to be no way for the uninstaller (or the installer for that matter) to escalate its privileges ONLY if needed.

 

0 Kudos
michieldhont_
Hot Shot
Hot Shot

Hi @hkessock,

Unfortunately it's not possible to do without using installer_is_root_install. Could you write us in private support for the reason you cannot use it? Perhaps we can provide you with a workaround.

Regards,

Michiel

0 Kudos