Setting sudo privileges for Db2

To use IBM Spectrum® Protect Plus to protect your data, you must install the required version of the sudo program. For the Db2® application server, you must set up sudo in a specific way that might be different from other application servers.

Before you begin

To determine the correct version of sudo to be installed, see technote 2013790.

About this task

Set up a dedicated IBM Spectrum Protect Plus agent user with the required superuser privileges for sudo. This configuration enables the agent user to run commands without a password.


  1. Create an application server user by issuing the following command:

    useradd -m <agent>

    where agent specifies the name of the IBM Spectrum Protect Plus agent user.
  2. Set a password for the new user by issuing the following command:

    passwd <agent>

  3. To enable superuser privileges for the agent user, set the !requiretty setting. At the end of the sudo configuration file, add the following lines:
    Defaults:<agent> !requiretty
    <agent> ALL=(ALL) NOPASSWD:ALL
    If your sudoers file is configured to import configurations from another directory, for example /etc/sudoers.d, you can add the lines in the appropriate file in that directory.