Oct 15, 2009, 5:05 AM
Post #1 of 3
How to automatically login into OMC using perl
I'm almost at the end of my project, and i've run into a problem.
The problem is that there are some commands which can only be run when logged in to the application which is the OMC.
Now how this OMC login works is, when run the command "omclogin -m cli".
First it prompts for a user name, and after user name a password.
In perl this is what i've done
`(sleep 6; echo "zomg\r"; sleep 1;echo "wai\r";sleep 4; echo "bdf\r"; sleep 2)| omclogin -m cli`;
so that first it enters the user name, then the password and then run the bdf command.
But i can't seem to login. (even if I just run the above command without the script).