Hello All, Please support if anyone having any action script to kill a running process.
As I am not able to delete the associated folder due to that.
Thanks
Varun
Hello All, Please support if anyone having any action script to kill a running process.
As I am not able to delete the associated folder due to that.
Thanks
Varun
I have also found the command which completely remove the client from MAC but I am not able to execute this through action script. Kindly help
Application Name- Forcepoint
command for uninstallation = sudo wepsvc --uninstall
After running the above command it will ask for password which is abc@123
Please support on creating an action script with password
https://www.websense.com/content/support/library/web/hosted/admin_guide/endpoint_mac_uninst.aspx
Need your support.
Hello, I’m out of the office and away from my computer, but you basically need to determine the PID of the process and then use kill to stop it. BigFix has some inspectors for the process ID, I believe. I’d probably try to build that first and then add it to your action script to do: wait kill {process id of processes whose (name of it contains “my app” as lowercase)}.
(pseudo code above, not tested.)
After that, you’ll likely need to build a createfile to run the uninstall and enter the password when prompted using expect. You may be able to echo the password into uninstalled, but I kinda think that won’t work.
I’m back Thursday and can assist then. Good luck!
Rusty
@Varun
What do you see in the terminal when you run ‘sudo wepsvc --uninstall’?
@rustymyers, while running the “sudo wepsvc --uninstall” in terminal it is asking for password, which required for complete un-installation.
@varun Can you post the output from the terminal when running that uninstall command?
Hi @rustymyers here is the output from terminal
Last login: Fri Oct 26 17:17:44 on console
TestMAC:~ varun$ sudo wepsvc --uninstall
Password:
Please enter the admin password:
The admin password you entered is incorrect.
TestMAC:~ varun$ sudo wepsvc --uninstall
Please enter the admin password:
The endpoint has been uninstalled successfully.
TestMAC:~ varun$
Thanks @Varun,
As I mentioned, you can use an expect script to launch and respond to the admin password. I’d suggest using createfile with the following:
#!/usr/bin/expect -f
set timeout -1
spawn ./questions
expect "Please enter the admin password:\r"
send -- "{parameter "admin password"}\r"
Then you can run that script with
wait /bin/bash /path/to/script
Hope that helps!
Thanks @rustymyers
Let me try with this. .Thanks
Hello @rustymyers
I have create a .sh and run the below script, but the action is getting failed on endpoint.
Is there anything i am missing here…
@Varun I took a min to test this expect script and it looks like it’s missing a ‘expect eof’ to end the file. It should look like:
#!/usr/bin/expect
set timeout -1
spawn "./path/to/wepsvc --uninstall"
expect "Please enter the admin password: "
send -- "{parameter "admin password"}\r"
expect eof
Also, the expect command in this post isn’t expecting a return after the "Please enter the admin password: " and has a space after the “:”. In your post of the output, it doesn’t look like there’s a space after the prompt, but there may be.