Created On:  25 April 2011

Problem:

An encrypted password file is created on a UNIX machine, using the syntax

stcmd ci -p "user:password@hostname:49201/StarDraw StarDraw" -epwdfile password -nologo -o -r
When executed on a machine different to the one on which the pasword file was created, it generates the error, "Invalid Password File".

Resolution:

The StarTeam command line can generate an encrypted password file, to be used with scripted operations, without revealing the password in clear text. The command syntax is as follows:

stcmd store-password -epwdfilename "filepath"

If a filename rather than an absolute path is specified, the file will be created in the current directory set in the current shell session.
If an absolute path is not supplied for the password file in the STCMD command, the file is assumed to exist in the current working directory of the shell session. For example,

stcmd ci -p "user:password@hostname:49201/StarDraw StarDraw" -epwdfile password -nologo -o -r

The above command will attempt to locate the file named "password" in the current directory, which is /root.

Either ensure the file is located in this directory, when running the above command, or specify an absolute path, such as follows:

stcmd ci -p "user:password@hostname:49201/StarDraw StarDraw" -epwdfile "/home/user/password" -nologo -o -r

Incident #2505152