Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.9, 1.10, 1.11
Description
Current Situation
- All JobScheduler setups use "sudo -E" to run the installer for the environment of the current user, i.e. creating the contents of the installation directory for the root user (or some similar privleged user) and creating the contents of the configuration directory for the current user.
- This mechanism has been introduced with the early days of JobScheduler to ensure that the $SUDO_USER environment variable shows the account of the caller.
- For sudo releases 1.6.9 - and possibly with specific platforms as Solaris - this environment variable had to be enforced by use of "sudo -E".
- With sudo releases 1.7.6 and later (tested up to 1.8.6) this environment variable is anyway set therefore there is no further need for "sudo -E".
- This sudo option works fine. However, it creates some hazzle for larger organizations that force users to modify the sudoers file to allow "java -jar ...". In addition the name of the .jar archive with the installer is specific for each release which requires the sudoers file to be modified accordingly for each release.
Desired Behavior
- The "sudo -E" setting should not be used by default but should be optionally maintained as it works for most environments.
Workaround
- You can test if your sudo version when used without the -E option writes the account of the caller to the $SUDO_USER environment variable with
sudo printenv | grep SUDO_USER
- if the environment variable is populated accordingly then modify setup.sh for any installer, e.g. JobScheduler Master, JOC Cockpit, in line 123 to replace my_sudo with sudo