Specifying User Credentials
Results 1 to 10 of 10

Thread: Specifying User Credentials

  1. #1
    Registered User Emerald-64's Avatar
    Join Date
    Jan 2006
    Posts
    18

    Arrow Specifying User Credentials

    Hi this is my first thread!

    I have used the "Run As" command to launch certain applications with different user credentials

    I wanted to know is there any way of specifying these user credentials at the command prompt?

  2. #2
    Registered User Stalemate's Avatar
    Join Date
    May 2001
    Location
    d4-e5
    Posts
    15,120
    Quote Originally Posted by Emerald-64
    Hi this is my first thread!

    I have used the "Run As" command to launch certain applications with different user credentials

    I wanted to know is there any way of specifying these user credentials at the command prompt?

    Could it be done through the launching of the actual command prompt itself with said credentials?


    And welcome to WD, Emerald-64.

  3. #3
    Registered User Emerald-64's Avatar
    Join Date
    Jan 2006
    Posts
    18

    Command Prompt

    Thanks stalemate

    In short, No. In detail:

    I have written a program in visual basic which executes commands in dos sequentially

    Each command is simmilar and needs to be executed under different credentials. The point in creating the application was that it runs the dos application not the other way round.

    I have been using the dos line:

    runas user:USERNAME <App path>

    the problem with this is that you are prompted for the password of the user and when you need to do this lots of users it gets boring, not to mention you get a ton of cmd.exe windows on your screen one for each user

  4. #4
    Registered User Stalemate's Avatar
    Join Date
    May 2001
    Location
    d4-e5
    Posts
    15,120
    I see.

    Thanks for the details. You' right, that won't work at all.

    But the RUNAS.EXE command from the command prompt can still help you out.

    Type it from a command prompt to get all the switches and paramaters and you're set. I think you'll need to use a text file to feed your parameters into the actual command line using the "/env" option.
    Last edited by Stalemate; January 19th, 2006 at 09:14 AM.

  5. #5
    Registered User Emerald-64's Avatar
    Join Date
    Jan 2006
    Posts
    18

    Question RunAs.exe

    Thanks

    but still got the same problem that app doesn't let you specify the password thanks anyway.

    I have tried using Batch scripts and Cmd Scripts and the prompt still breaks for the password.

    Oh and the /env option isn't helping at all, if anything complicating things i think i'll leave that out

  6. #6
    Registered User Stalemate's Avatar
    Join Date
    May 2001
    Location
    d4-e5
    Posts
    15,120
    Bummer...

    Let me think about that one while I get a second cup of coffee.

  7. #7
    Registered User CeeBee's Avatar
    Join Date
    Nov 2002
    Location
    USA
    Posts
    2,494
    What you need is either Kixtart (http://www.kixtart.org) or, even better, PSEXEC (part of PSTOOLS, http://www.sysinternals.com). Depends very much on whether the user running the app should be able to see the credentials or not. Kixtart will "spit" the keystrokes into the script (hidden) while psexec accepts the password as a command line argument. The disadvantage of Kixtart is that if the user has CAPS LOCK on, the logon will fail as the keystrokes will be sent in upper case.

  8. #8
    Registered User CeeBee's Avatar
    Join Date
    Nov 2002
    Location
    USA
    Posts
    2,494
    One more thing, be aware that in either case the user might have the possibility of editing the script and the passwords are in clear text... So if security is a concern, think of writing a small app that has the passwords in a scrambled format and de-scrambles them when launching the script. Still not perfect, but better than nothing.

  9. #9
    Registered User Stalemate's Avatar
    Join Date
    May 2001
    Location
    d4-e5
    Posts
    15,120
    Thanks for the input CeeBee.

    Coffee not doing it this morning for me.
    I was looking into similar solutions, like RunAs Professional and VBScripting, but if Kix is already in use for Emerald-64 perhaps that would be ideal.

  10. #10
    Registered User Emerald-64's Avatar
    Join Date
    Jan 2006
    Posts
    18

    Run As

    Thanks All!

    I got the app running using the shell send keys command with the help of WScript. Not perfect and still got flaws but it does the job

    If the user is running more than one app it goes to the active app so you switch to word pad and the data comes up on screen instead of going to the command script

    RunAs professional seems to saolve all of my problems so it clearly is possible, however you have to buy it and i don't fancy paying for something i am only going to use once (waste)

Similar Threads

  1. Replies: 0
    Last Post: December 23rd, 2004, 03:12 PM
  2. Roaming user profile
    By Todo in forum Windows NT/2000
    Replies: 5
    Last Post: May 16th, 2004, 12:40 PM
  3. group policy?---advanced
    By qwicker in forum Windows XP
    Replies: 2
    Last Post: October 15th, 2003, 06:12 AM
  4. unauthorized access?
    By Poseidon in forum Spyware & Antivirus - Security
    Replies: 10
    Last Post: June 11th, 2002, 03:58 AM
  5. System loads user profile @ every login
    By Chapin in forum Novell
    Replies: 1
    Last Post: May 11th, 2001, 10:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •