It's all about the answers!

Ask a question

Automated command-line tools & password authentication


Fraser Gordon (112) | asked Dec 29 '09, 3:28 p.m.
We are implementing automated scripts to generate command-lines to the RTC command-line, but we don't want to expose the password to end-users.

The login command is as follows:

scm.exe login -r <repo> -u <user> -P <password>

Is there an approved way to get the password such that it is not visible on the command-line, and that it is not stored in a user-readable format on the system?

2 answers



permanent link
Jose Miguel Ordax Cassa (2.4k4126100) | answered Dec 30 '09, 3:23 a.m.
On 29-Dec-09 9:36 PM, fraser.gordon wrote:
We are implementing automated scripts to generate command-lines to the
RTC command-line, but we don't want to expose the password to
end-users.

The login command is as follows:

scm.exe login -r<repo> -u<user> -P<password

Is there an approved way to get the password such that it is not
visible on the command-line, and that it is not stored in a
user-readable format on the system?


Check "lscm" command in the help system.
It starts a lightweight daemon so login credentials have been already
provided and your scripts don't require them anymore when executed in
that way.

Hope it helps,

Chemi.

permanent link
Fraser Gordon (112) | answered Dec 30 '09, 11:08 a.m.
On 29-Dec-09 9:36 PM, fraser.gordon wrote:
We are implementing automated scripts to generate command-lines to the
RTC command-line, but we don't want to expose the password to
end-users.

The login command is as follows:

scm.exe login -r<repo> -u<user> -P<password

Is there an approved way to get the password such that it is not
visible on the command-line, and that it is not stored in a
user-readable format on the system?


Check "lscm" command in the help system.
It starts a lightweight daemon so login credentials have been already
provided and your scripts don't require them anymore when executed in
that way.

Hope it helps,

Chemi.

Thanks! That seems to point me in the right direction.

...From a Windows standpoint, I notice the lscm.bat file isn't 100% generic. Spaces in the install path caused me grief, (C:\Program is not recognized as an executable) and the path to the java binary didn't match what was in my install directory, but once those two issues were fixed in the batch file, I was able to log in and use those credentials in later lscm commands without having to re-supply the user/password.

Fraser

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.