- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
Watch NowOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hello!
I am try to delete extra admins in userScripts.
echo "Check Users" > /tmp/check_admins
for USER in $(cat /etc/passwd | grep -E '/bin/bash|/bin/clish' | awk -F: '{ print $1 }')
do
echo $USER >> /tmp/check_admins
if [ "$USER" = "admin" ]
then
echo 'OK' >> /tmp/check_admins
else
# /bin/clish -c "delete administrator username $USER" >> /tmp/check_admins
deluser $USER
echo "User $USER was deleted" >> /tmp/check_admins
fi
done
If I use the command deluser, then the admin is removed from the passwd, but remains in the web and clish interface
If I use the clish command, the admin is not deleted and I get an error: "Unexpected error: attempt to index global 'cgilua' (a nil value)".
If I run this script manually, I get an error: "Could not set administrator: Invalid action: User is logged in". Although the script is run by a different user.
How can I delete extra admins?
Run "save config" at the end
SMB devices do not have a 'save config' command. We use Checkpoint 1430, 1530 devices.
You never specified that in the original post.
This changes the whole thing. Gaia embedded uses different set of shells and commands. You are using regular Gaia bash commands, which may lead to corrupted admin database on SMB. Soft-reset, if the user is still there, you may need to hard reset do default and reconfigure.
Clish command not working in /pfrm2.0/etc/UserScript?
Once again. Native clish commands do. But calling them from bash shell is a different matter.
Can't solve my problem with this script?
Regardless of using SMB or not, one should never use the expert mode commands to manage users.
This needs to be done via clish only using the appropriate syntax.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 5 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
Tue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY