Passwords may be encrypted for use in a CL or in the API with the GETFILE, SENDFILE, SENDREPORT and SENDJOB commands. This avoids the previous requirement to specify passwords in plain text. Previously, the RMTPSW parameter had to be specified in plain text.
A utility, XCOMXPAND is available to convert the plain text password to an encrypted password. XCOMXPAND encrypts passwords only for storage and use on the AS/400 and does not affect transfers to remote partners. The password is already encrypted when being sent to a remote partner.
Encrypting Passwords with the XCOMXPAND Utility
XCOMXPAND uses the following keywords in positional order:
RMTPSW Remote System Password
Required. The remote system password. This is a non-displayable field. Valid entries: The remote system password can have to up to 31 characters. Put the password in single quotes to prevent case translation. Initial value: None
LIBNAME Local Get File.
Required. The file/member that is to be created or replaced to hold the resulting encrypted 70 hex-character value password. Valid entries are any valid AS/400 library name/filename and optional member name. If a member name is not specified, the file name is used as the member name. Initial value: None
This utility can be invoked from the command line using the following syntax:
XCOMXPAND RMTPSW(your_password) LIBNAME('library/file(member)')
or by entering XCOMPAND on the command line and prompting it. If prompted, enter the remote user's password (RMTPSW) that is to be encrypted and tab and enter where to store the encrypted password (LIBNAME) in the standard AS/400 format of LIBRARY/FILENAME(member).
The library must exist or the utility terminates with a message:
Library XXXXXXX not found.
If the member is omitted, it will default to the filename. If the file does not exist, the file and member will be created by XCOMXPAND. However, you will get an error message or multiple error messages at the bottom of the screen indicated by the "+" at the end of the message. If there are multiple messages, scroll down until the "+" is no longer displayed. The last message should be "Requested Function Successfully Completed".
Example
The following is an example of prompting the XCOMXPAND command:
CA-XCOM PSWD ENCRYPT UTILITY (XCOMXPAND)
Type choices, press Enter.
Password on the remote system.
Local Library Name. . . . xcomtest/password(mvs13)
This creates a 70 hex-character encrypted password in xcomtest/password(mvs31). Messages are displayed at the bottom of the screen. If the member does not exist, XCOMXPAND creates the member. Be sure to review all messages if a '+' appears at the right of the message at the bottom of the screen.
Using the Encrypted RMTPSW Parameter
The encrypted password can be used in the RMTPSW field of XCOM for AS/400 command, CL, or API. The RMTPSW parameter value can either be the 70 character hex contents from the library/file(member) where XCOMXPAND stored the encrypted password or the path to the encrypted password using the following syntax:
RMTPSW('ENCR_PWD_FM= library/file( member)')
Or
RMTPSW( encrypted_hex_value_from_member)