Skip navigation

Setting Which Credentials to use for Accessing a System

Q. How can I set which credentials to use for accessing a system?

A. When you connect to a new system that can't use your logged on context or your credentials are not passed automatically, you might be prompted for authentication or the access will just fail. It's possible to configure alternate sets of credentials to be used for various systems using the CMDKEY utility, which takes as parameters the target system and the credentials to use, as this example shows:


C:\Users\administrator.VIRT>cmdkey /add:savdalfs01.savilltech.net /user:savilltech\bruce /pass:
Enter the password for 'virt\bruce' to connect to 'savdaldc01.savilltech.net': ****

CMDKEY: Credential added successfully.

C:\Users\administrator.VIRT>cmdkey /list

Currently stored credentials:

Target: savdalfs01.savilltech.net
Type: Domain Password
User: savilltech\bruce

Target: savdaldc01.savilltech.net
Type: Domain Password
User: savdaldc01.savilltech.net\savadmin
The password can be contained on the actual cmdkey line, instead of prompting for it. You can remove an entry using the cmdkey /delete: command.
— John Savill
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish