- Products
- Learn
- Local User Groups
- Partners
-
More
Celebrate the New Year
With CheckMates!
Value of Security
Vendor Self-Awareness
Join Us for CPX 360
23-24 February 2021
Important certificate update to CloudGuard Controller, CME,
and Azure HA Security Gateways
How to Remediate Endpoint & VPN
Issues (in versions E81.10 or earlier)
Mobile Security
Buyer's Guide Out Now
Important! R80 and R80.10
End Of Support around the corner (May 2021)
This is for made for MDS but it should work on a regular management server too.
Our MDS on R80.10 doesn't clear out old sessions when an admin uses SmartConsole. New sessions are created when admins log in and the old sessions just stick around, continually building up. That makes the sessions tab ugly to look at and makes it hard to find that session with locks that is giving you trouble that you want to discard.
This script removes all sessions that are logged out and have no changes (so a lock with no changes will get cleared too). I would have gone by locks instead of changes but when sessions are queried, locks is always at least 1. That might be a bug.
The usage is <scriptname> <days to save> <Y/N prompt for user & pw if needed>.
For the option to prompt user & pw: in my experience, sometimes root login to a domain fails but the user login works. So if a Y is specified, then the script will try root login first, and if one fails, the script will prompt the user for a username & password to use instead (leaving the option blank or using anything that isn't a Y will result in root login attempts only).
In my environment, I used crontab to schedule the script as follows, and it works great: <script> 0 N
Use this script at your own risk. It works great for me but I cannot guarantee it is safe to use in your environment.
About CheckMates
Learn Check Point
Advanced Learning
WELCOME TO THE FUTURE OF CYBER SECURITY