05-07-2013 08:32 PM - edited 05-21-2013 01:43 AM
in case that an user is running a tool which use a specific script , how can I figure out which user is running the tool on that script.
Thank in advance.
Solved! Go to Solution.
05-21-2013 05:27 AM
I believe that when you launch the tool from the BSM Console you will see the details of the user who is going to run the tool in the "Preview Tool Execution" screen. It will be listed as "As User".
You can also find the details of the user that the tool is set to run in the actual tool definition itself in the
Admin -> Operations Management -> Operations Console -> Tools
To view this I believe you will need proper user rights in BSM/OMi server.
Hope this helps.
05-22-2013 07:08 PM
Specifically, I have an example: user X is running tool A that triggers a script named S.bat, how do I retrieve the username of user X ( listed as "As User") on S.bat script.
05-23-2013 06:08 AM - edited 05-23-2013 06:12 AM
This is what I was referring in my last post. The user who is running the batch file will get listed in the preview screen.
Hope this helps.
05-23-2013 11:49 PM - edited 05-23-2013 11:52 PM
I'm sorry for making you misunderstand my question and wasting ur time.
My example below, when user "ndduc" (showed in As User:) run Test tool which will call Test.pl script. Then when Test.pl script execute how can I get user ndduc in script at runtime, for example, have a script like this:
print $operatorName; # will print "ndduc"
05-24-2013 05:36 AM
Ah as you can see I obviously misunderstood your question. Check this link to see if it helps.
It looks like the getlogin() may do this for you. I have not done much perl scripting and so you will have to test this to see if it works for you.
Hope this helps or you get a better answer :)
05-26-2013 07:01 PM - edited 05-26-2013 07:09 PM
It works! Thanhk you very much for your answer.
By the way, I have one more question
Does BSM/OMi have any log specifying the date/time, which tool.... the user executed.