Password as an input paramete for a Command Task

All questions about Control-M jobs definitions
Post Reply
User avatar
dkaris
Nouveau
Nouveau
Posts: 27
Joined: 10 Nov 2008 12:00

Password as an input paramete for a Command Task

Post by dkaris » 10 Nov 2008 9:01

Hello group,
I have an exe file that I need to execute through Control-M. The problem is that this exe file requires a password as an input parameter.

So the command looks like the following:

test.exe -d <date> -u <username> -p <password>

is there any way to send the password so that nobody can see it either in the command line or through the sysout?

Can I encrypt it somehow?

Kind Regards
Dimitris

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 13 Nov 2008 11:41

is there any way to send the password so that nobody can see it either in the command line or through the sysout?
There is many ways:
You can do in windows a .bat file that do the command.
At the begin of this batch file write:
@echo off
so you dont see the command executed in the sysout.

And in the command write:

test.exe -d %1 -u %2 -p %3

So if someone read the batch file dont see any pass.
And in the "set panel" set the parameters:
PARM1=<date>
PARM2=<username>
PARM3=<password>

If this is not the answer because you dont want to have the password in the set panel: use the LIBMEMSYM file to set variables.
Infact this file resides on the controlm server and the conten is not seen in the set panel (and the file can be not accessible for users).

User avatar
dkaris
Nouveau
Nouveau
Posts: 27
Joined: 10 Nov 2008 12:00

Post by dkaris » 01 Dec 2008 11:17

Thank you very much...

I think that the LIBMEMSYM is the way to go....

Is there any kind of encryption that can be used in phase of that mechanism?

Kind Regards

User avatar
Dilbert
Nouveau
Nouveau
Posts: 185
Joined: 10 Jan 2007 12:00
Location: Zagreb, Croatia

Post by Dilbert » 02 Dec 2008 8:49

I will use the following way:

enter that exe command, with all parameters into bat script (start script with @echo off).
convert that bat script into exe (search for BAT2EXE converter).

Et voila! You have exe script with username and password inside, and no one can see it. And that should work, I already tested it once, worj without problem. :)

User avatar
dkaris
Nouveau
Nouveau
Posts: 27
Joined: 10 Nov 2008 12:00

Post by dkaris » 04 Dec 2008 3:17

Hello,
i tried the LIBMEMSYM approach and it seems it works...except from ine little part.

Follow the simple example below to understand:

I have a bat file called a.bat
The file runs the command echo %1
I create a command task to Control-M that runs the following: a.bat %%PARM1

It runs succesfully and here is the sysout:

c:\a.bat Parameter 1

echo Parameter
Parameter

Job Object statistic
====================
Total User CPU Time: 0.016 second

Total Kernel CPU Time: 0.031 second

This Period Total User CPU Time: 0.016 second

This Period Total Kernel CPU Time: 0.031 second

Total Page Fault Count: 746

As it is obvious, I can see the submitted command the value of the parameter and the outcome of the command.

If I put @echo off in the bat file before the command execution, in the sysout again I see

c:\a.bat Parameter 1
Parameter

That is the command that is sent from Control-M and the outcome.

How can I hide the c:\a.bat Parameter 1 line...I do not want for anyone oto see it in the sysout.

Regards
Dimitris

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 17 Dec 2008 2:36

I create a command task to Control-M that runs the following: a.bat %%PARM1
It runs succesfully and here is the sysout:
c:\a.bat Parameter 1
The %%PARMn is for the JOB tasktype !

So do the following:
- In the general panel on desktop:
tasktype JOB
path C:\
fileName a.bat

- in the set panel:
PARM1=test

- in the execution panel NODEID the name of the agent machine where a.bat is saved.

- write+upload and run the job

Admin007

Post by Admin007 » 22 Dec 2008 4:13

Can @echo off be used for AIX UNIX scripts as well? We have UNIX scripts that contain sensitive password info and do not want it to show in the sysout. I've made changes to the Control-M configuration file to suppress exported information in the sysout but for some reason when run as task type JOB, the password is still visible in the sysout. If run as a task type COMMAND the password is suppressed.

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 13 Jan 2009 7:24

Can @echo off be used for AIX UNIX scripts as well?
In unix shell the command is
set +x
.

Post Reply