runas command - saved credentials - how does one "save" the credentials?

Discussion in 'Scripting' started by Bruce Sanderson, Oct 18, 2006.

  1. The help for the runas command (runas /?) describes the /savecred option as
    "to use credentials previously saved by the user.".

    Well, perhaps my ignorance is showing, but:

    1. how does one "save" credentials for use by this option?
    2. does credentials mean exactly domain name, username and password?
    3. assuming I get the "credentials" "saved", does this mean that when I use
    the runas command, specify a domain user name via the /user option that
    there will not be a prompt for password?
    Bruce Sanderson, Oct 18, 2006
    1. Advertisements

  2. Bruce,

    1. You use /savecred first to save credentials. Consider following sequence:

    c:\>runas /user:Administrator /savecred cmd.exe
    Attempting to start cmd as user "COMPUTER\Administrator" ...
    Enter the password for Administrator:

    [you supply password for Administrator account]

    Attempting to start cmd as user "COMPUTER\Administrator" ...

    [new cmd window opens]

    c:\>runas /user:Administrator /savecred cmd.exe
    Attempting to start cmd as user "COMPUTER\Administrator" ...

    [new cmd window opens without password request]


    2. Yes. After you used runas /savecred to save credentials, you should see a
    new entry in Stored User Names and Passwords (Start > Run > control
    userpasswords2 > Advanced > Manage Passwords)

    3. Yes.

    Note however that this allows users to launch any program under stored
    credentials without knowing password. Taking into account that runas usually
    is used to start things with administrative provoleges, this may be quite

    If you need alternate credentials to access some network resources, you can
    limit attack surface by storing credentials strictly for access to
    particular network resource (though per-server, not per-share).
    Alexander Suhovey, Oct 21, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.