Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.16.7 Notes When Connected User And Executing User Are Different

The sudo command is used when the connected user and executing user are different. The following settings are required on Business Servers so that the sudo command can be executed from Systemwalker Runbook Automation.

  1. Log in to the Business Server.

  2. Switch to the root user or a user that has administrator privileges.

  3. Edit the sudo configuration file.

    # visudo

  4. Edit the file so that the following settings are configured for connected users.

    • The sudo command can be executed from terminals other than "tty" terminals.

    • The sudo command can be executed without specifying the password.

    • The value of the LANG environment variable is transferred to the executing user.

    Example 1: This example shows how to allow a connected user, "user1", to execute the sudo command from terminals other than "tty" terminals.

    Defaults:user1 !requiretty

    Example 2: This example shows how to allow a connected user, "user1", to execute the sudo command without specifying the password.

    user1 ALL=(ALL) NOPASSWD:ALL              # Omit input of user1 password

    Example 3: This example shows the settings for allowing a connected user, "user1", to transfer the value of the LANG environment variable to the executing user.

    If LANG is included in the Defaults:user1 env_keep parameter, the value of the LANG environment variable will be transferred to the executing user.

    Defaults:user1 env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
                            LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
                            LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
                            LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
                            LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
                            _XKB_CHARSET XAUTHORITY"
    • Note that the above setting has effects beyond the execution of Systemwalker Runbook Automation, so take care when setting.

    • As the sudo command does not exist if the Business Server is a Windows or Solaris system, an error occurs if the connected user and executing user are different. Ensure that the same user is specified as connected user and executing user if the Business Server is a Windows system.