It's all about the answers!

Ask a question

RTC-SCM-CLI: lscm login command accepts wrong password (if the user is already logged in)

Karthikeyan Baskaran (45813) | asked Oct 10 '13, 8:33 a.m.
retagged Oct 12 '13, 12:54 p.m. by Ralph Earle (25739)
1) When lscm.bat is called via command prompt, with the below login command:
lscm login -r <server> -u <user>
it asks for the user password like:
Password (<user> @ <server>):
When I type the wrong password and press enter, I get the feedback as:
Logged in to <server>
2) Then, I continued executing lscm.bat with the below "create workspace" command
lscm create workspace -e -r <server> <workspace_name>
it now asks for the user password again like:
Password (<user> @ <server>):
(I think, the password is asked again, because I provided wrong password during step-1)

3) I still provided wrong password and pressed enter.
The feedback is:
Workspace (1051) "<workspace_name>" successfully created
To my surprise, when I checked in the web client, this workspace is actually created from the same user of step-1

What's going on here ? Is it using any of my previous successful login credentials internally ? if yes, how can I clear that cache ?

Thanks for your help in advance.

Karl Weinert commented Oct 10 '13, 9:25 a.m.

What version of the SCM tool and the server?
Have you or anyone else on this client ever logged in with the -c switch?
I'm thinking maybe the cached credentials are being used if you have.

Karthikeyan Baskaran commented Oct 11 '13, 2:58 a.m.

I'm using CLI tool from the package: RTC-scmTools-Win-4.0.3
Rational Jazz Team Server version: 4.0.4

I'm the only person who has logged into this PC so far and I'm sure I didn't use -c switch on this PC.

However I've logged into the web client several times from this PC (with the "Remember my User ID" option enabled. Do you think this web client would have cached my credentials ? If yes, how to clear the cache, so that I could re-evaluate the CLI ?

Accepted answer

permanent link
Ralph Schoon (62.7k33643) | answered Oct 11 '13, 4:34 a.m.
I would suggest to read the help e.g. which also clearly mentions that the credentials are stored. Just below that command you find the logout command and a description what it does with the credentials. The image below shows the topic and also an example demonstrating how to search the help.

Karthikeyan Baskaran selected this answer as the correct answer

Karthikeyan Baskaran commented Oct 11 '13, 5:27 a.m. | edited Oct 11 '13, 5:30 a.m.

You are right. The "logout" command clears the cache.

When I executed the steps:
1. Execute logout CLI command
2. Execute login CLI command with wrong password

Proper error message is displayed:
Could not log in to <server> as user <user>: CRJAZ0124I Invalid username or password.
lesson learnt:
In case if you are building a wrapper tool around CLI, and when the user triggers the login command from this wrapper, then internally call the logout CLI command before calling the login CLI command, so that the wrong credentials provided by the user can be captured.
Thanks for your help. Setting as correct answer.

Your answer

Register or to post your answer.