- Products
- Learn
- Local User Groups
- Partners
- More
What’s New in Device Diagnostics?
Dec 2nd @ 5pm CET / 11am EST
AI Security Masters
Security in the Pace of AI:
From Threat to Force Multiplier
CPX is Back!
Join us in Las Vegas, Vienna, and/or Bangkok!
Check Point Named a Leader
The Forrester Wave:
Enterprise Firewall Solutions, Q4 2026
What’s New in Agentic Network Orchestration
CheckMates Go:
Fun Ding
Hello everyone, I encountered a problem when using the API here. I hope to get help.
I call the API command in the gateway's Clish, and use mgmt login user (user_name) password (password) ip-address (address) in clish. But I add it to the script and use clish -c "mgmt login ip- address 192.168.10.252 user admin password ***" After running the script, I found that the login was not successful, and no error message was found in the message log file. Does any friend encounter this kind of problem?
Add this to the top of your script: source /opt/CPshrd-R80.40/tmp/.CPprofile.sh
(Replace R80.40 with your version)
This will add mgmt_cli to the path so you can include it in your scripts.
I've never seen anyone call it that way before (i.e. using clish -c in a script).
Why aren't you using mgmt_cli instead, which can be called from a script?
i know, but mgmt_cli Cannot be used in scheduled tasks
Add this to the top of your script: source /opt/CPshrd-R80.40/tmp/.CPprofile.sh
(Replace R80.40 with your version)
This will add mgmt_cli to the path so you can include it in your scripts.
OK, thank you very much, I will try
I tried the method you said, adding at the top of bash:
source /opt/CPshrd-R81.10/tmp/.CPprofile.sh
I did not see the execution process in the message log file, but I saw the execution log in the Audit log.
Thank you for your answer
clish -c "...." is a single CLISH command called from bash. API calls will not work like that. To use API from bash and for scripts, do mgmt_cli, as @PhoneBoy already said.
I need to make this action into a scheduled task. I tried to replace clish -c "mgmt" with mgmt_cli, but mgmt_cli will not be executed in the scheduled task
I use many scripts through the schedulers to run many Check Point tasks and it works well. Your problem is your CP environment is not loaded (Ex: $FWDIR, $PCDIR, etc. are missing) when you execute a CP program through your script. Add this line ". /etc/bashrc" (valid if you are running GAIA) in the top of your script. Example:
#!/bin/bash
. /etc/bashrc # Load the Check Point environment if a GAIA (DOT space must be at the beginning of the line)
:
The rest of your script here
If my script is running on a SMB (ex 1400, 1500, etc.), I use: . /pfrm2.0/etc/bashrc
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 1 |
Tue 24 Nov 2026 @ 01:30 PM (GMT)
La nueva realidad de los ataques DDoS: autonomía, escala y el futuro de la defensaThu 26 Nov 2026 @ 10:00 AM (CET)
The Cloud Architects Series: Cloud Security State in 2026 – Lessons Learned and a Look AheadWed 02 Dec 2026 @ 02:00 PM (CET)
E-Mail-Agent-Hijacking: E-Mail-Sicherheit im Zeitalter der KI neu überdenkenWed 02 Dec 2026 @ 02:00 PM (GMT)
Why Email Agent Hijacking Marks the End of Post-Delivery Email SecurityWed 02 Dec 2026 @ 03:30 PM (GMT)
The New DDoS Reality: Autonomy, Scale, and the Future of DefenseTue 24 Nov 2026 @ 01:30 PM (GMT)
La nueva realidad de los ataques DDoS: autonomía, escala y el futuro de la defensaWed 02 Dec 2026 @ 02:00 PM (CET)
E-Mail-Agent-Hijacking: E-Mail-Sicherheit im Zeitalter der KI neu überdenkenWed 02 Dec 2026 @ 02:00 PM (GMT)
Why Email Agent Hijacking Marks the End of Post-Delivery Email SecurityWed 02 Dec 2026 @ 03:30 PM (GMT)
The New DDoS Reality: Autonomy, Scale, and the Future of DefenseWed 02 Dec 2026 @ 11:00 AM (PST)
Why Email Agent Hijacking Marks the End of Post-Delivery Email SecurityAbout CheckMates
Learn Check Point
Advanced Learning
WE SECURE YOUR AI TRANSFORMATION