Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • For user switching the Agent has to be operated for a user account or service account, not for the system account.
  • The credentials of the target user for which a job should be executed are not stored with JobScheduler configuration data. Instead the user account that runs the JobScheduler Windows Service stores credentials with the Windows Credential Manager. When a job should be executed then the JobScheduler Agent reads the credentials from the Windows Credential Manager. Reading credentials that have previously been stored using the same account works without the need to specify a password. Therefore the solution is free from use of passwords.
  • A login is performed with the target user credentials and the user's environment is active when executing the job.

...

  • Permission: SE_BATCH_LOGON_NAME
    • English: Log on as a batch job 
    • German: Anmelden als Stapelverarbeitungsauftrag

Job Configuration

Jobs that should be executed for a target user have to be assigned the credentials key that has previously been stored with the Credential Manager for the Agent account. A resulting job could look like this: 

Code Block
languagexml
titleJob configuration for target user
<job  order="yes" stop_on_error="no" credentials_key="run_as_user" load_user_profile="true">
    <script  language="shell">
        <![CDATA[
@echo username %USERNAME%
@echo userprofile %USERPROFILE%
        ]]>
    </script>
    <run_time />
</job>

 

When using the JOE job editor the settings for the credentials key and loading of user profile are available from the "Options" tab.

Error Messages

This chapter is intended to explain common error messages and pitfalls. Find a complete reference from System Error Codes.

...

 

This error message tells you that the credentials key that you added to the job configuration does not match to a respective entry with the Crendential Manager. Possible reasons include wrong spelling or the fact that the credentials have not been added by the Agent account but by some different account.

Errors when setting file permissions

...

 

A wrong username has been specfied for the target user with the Credential Manager. You can use the runas command line utility  to to check valid usernamesuser names.

Errors when performing a logon for a target user

...