Page 1 of 1 1
Topic Options
#127716 - 2004-10-11 09:11 PM runas scripting
RonM Offline
Fresh Scripter

Registered: 2004-10-11
Posts: 16
I have a command here that works form a command line perfectly but i cant get kixtart to run it. it gives me the runas options help when it runs.

RUN "runas /u:sssnt\username \\avalanche\fx\fx\msjavx86.exe | SANUR password

Sanur is a little util to pass the password to the runas command. any ideas?


Top
#127717 - 2004-10-11 09:44 PM Re: runas scripting
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, at least you miss the trailing quote
_________________________
!

download KiXnet

Top
#127718 - 2004-10-11 09:50 PM Re: runas scripting
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Plus, to make the PIPE work, you need to use the commandline parser, something like:

SHELL '%comspec% /c runas /u:sssnt\username \\avalanche\fx\fx\msjavx86.exe | SANUR password'

Top
#127719 - 2004-10-12 12:39 AM Re: runas scripting
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And search this BBs for other SANUR threads as some of them will explain to you why this approach is inheritantly insecure and should NEVER be used! Why not put the admin passwords up on the corporate bulletin board instead?
_________________________
There are two types of vessels, submarines and targets.

Top
#127720 - 2004-10-12 02:14 AM Re: runas scripting
Incognito Offline
Getting the hang of it

Registered: 2001-07-09
Posts: 66
Greeting Ron,

If you need an alternative to runas, the CPAU utility works quite nicely:

http://www.joeware.net/win/free/tools/cpau.htm

You can compile jobs and encrypt the job information to pass passwords. I believe this may be a better utility to use then the RUNAS since it has better password handling.

Top
#127721 - 2004-10-12 02:33 PM Re: runas scripting
RonM Offline
Fresh Scripter

Registered: 2004-10-11
Posts: 16
appreciate the answer. that worked nicely. also, right now i need something quick and dirty to use as we are in a bind. 145 machines to attend to and only 2 it staff. job needs to be completed by friday. I will look at the cpau util though. thanks.

btw i intend to only have these people run this script for maybe and hour before disabling the account used.

Top
#127722 - 2004-10-13 01:17 AM Re: runas scripting
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
As stated in the FAQ Forum, the use of the Task Scheduler is a secure method. Any method that somehow exposes a plain text password is inheritantly insecure.
_________________________
There are two types of vessels, submarines and targets.

Top
#127723 - 2004-10-13 01:25 AM Re: runas scripting
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
You could also temporarily make all your users local administrators by adding a group to the local workstations and then adding/removing users after the installation is complete.

Check out the UDF mirrors or here on Korg for UDF to remotely achieve this task.

Top
#127724 - 2004-10-14 11:37 PM Re: runas scripting
Anonymous
Unregistered


Hi there, did you ever get this to work?
Top
#127725 - 2004-10-14 11:48 PM Re: runas scripting
Anonymous
Unregistered


Hi Shawn, could you take a look at this and let me know what I'm doing wrong. I can't seem to get this command working correctly...

RUN "runas /user:domain\support \\mainfileserver\setuprmt.exe | sanur password"

Thank you.

Top
#127726 - 2004-10-15 12:52 AM Re: runas scripting
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
To get the pipe | to work, need to use %comspec% like this:

shell '%comspec% /c runas /noprofile /user:administrator <cmd> | sanur.exe <passwd>'

Or something along that lines, can't actually test it right now.

-Shawn


Top
#127727 - 2004-10-15 01:26 AM Re: runas scripting
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Is there an echo in here?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#127728 - 2004-10-15 03:07 AM Re: runas scripting
Cybex Offline
Getting the hang of it
*****

Registered: 2004-07-21
Posts: 81
Loc: Brandon, FL.
Right... It's like Deja vu. They must have changed something inside the matrix.
_________________________
Common sense isn't so common.

Top
#127729 - 2004-10-15 03:14 AM Re: runas scripting
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Just hope it's not Groundhog Day with Bill Murray.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 494 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.266 seconds in which 0.16 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org