🛒 More SmartTasks
👍 Tested to be working with R81.20+
SmartTask to verify SSH login to the security management is not set to: /bin/bash
Script code
Copy the code below into a new script of your SmartConsole script repository.
test `grep passwd:admin:shell /config/db/initial|grep bash|wc -l` -ne 0 && echo '{"result":"failure","message":"SSH login to '$(hostname)' must not be set to: /bin/bash"}' || echo '{"result":"success"}'
SmartTask
Create a new SmartTask in SmartConsole > Manage & Settings > SmartTasks and install policy to activate the new task.
Name |
Trigger |
Action |
Enabled |
Task_BashLoginCheck |
Before Publish |
Run Script |
✔️ |