Securing credentials in dsadmin commands

You can encrypt your credentials and store the encrypted values in files to use in dsadmin commands. To enter credentials in the command line, you can alternatively use credential prompting to hide your password in the command window.

You can use encrypted credentials in your dsadmin commands so that you can avoid typing clear data on the screen when you run commands in the command line. See the Encrypt command documentation in the IBM® InfoSphere® Information Server Administration Guide for information about this command.
  1. Encrypt your credentials by running the encrypt command, and copy and save the encrypted values in a credentials file (*.txt).
    See the topic on the credentials file for restrictions and sample contents for the credentials file.
  2. Run the dsadmin command.
    You can enter your credentials securely by using one of these methods:
    • Using the credentials file. If you are running a dsadmin command that requires your user credentials, run your command with the -authfile parameter and specify the full path of the credentials file that you want to use. A sample syntax for using the -authfile parameter in a dsadmin command is as follows:
      dsadmin -authfile c:\cred_file.txt 
      	-listprojects
    • Credentials prompting. If you want to specify your credential data through the command line, specify only the -url or the -domain parameter, and the -server parameter. You are prompted for the user name and password. (The password is hidden in the command window.) If you include the -url or the-domain parameter, and the -server and -user parameters in your command, then you are prompted for the password.