|
-
January 19th, 2006, 08:32 AM
#1
Registered User
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?
-
January 19th, 2006, 08:56 AM
#2
Registered User
 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.
-
January 19th, 2006, 09:09 AM
#3
Registered User
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
-
January 19th, 2006, 09:11 AM
#4
Registered User
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.
-
January 19th, 2006, 09:20 AM
#5
Registered User
-
January 19th, 2006, 09:21 AM
#6
Registered User
Bummer...
Let me think about that one while I get a second cup of coffee.
-
January 19th, 2006, 09:49 AM
#7
Registered User
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.
-
January 19th, 2006, 09:54 AM
#8
Registered User
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.
-
January 19th, 2006, 10:08 AM
#9
Registered User
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.
-
January 20th, 2006, 04:31 AM
#10
Registered User
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
-
By aromes in forum Windows NT/2000
Replies: 0
Last Post: December 23rd, 2004, 03:12 PM
-
By Todo in forum Windows NT/2000
Replies: 5
Last Post: May 16th, 2004, 12:40 PM
-
By qwicker in forum Windows XP
Replies: 2
Last Post: October 15th, 2003, 06:12 AM
-
By Poseidon in forum Spyware & Antivirus - Security
Replies: 10
Last Post: June 11th, 2002, 03:58 AM
-
By Chapin in forum Novell
Replies: 1
Last Post: May 11th, 2001, 10:45 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks