Notifications
Clear all

Enable Linux Malware Detect (maldet) Monitoring at System Boot

1 Posts
1 Users
0 Likes
7 Views
Tharindu
(@tharindu)
Reputable Member Admin
Joined: 9 years ago
Posts: 307
Topic starter  

Linux Malware Detect (maldet) doesn't register itself as a service. This is going to be a problem if you're using maldet monitoring mode.  Because you'll have to manually start maldet each time your server reboots.

There is a inti script to register maldet as a service. But I never got it working. I gave up without troubleshooting it because I know a easy way to do it. We can simply run the maldet monitoring command at boot using /etc/rc.local file.

So to do this, we'll first create a file to include all the directories we want to monitor.

nano /usr/local/maldetect/monitor_paths

Paste paths to all the directories you want to monitor as a comma separated list in this file. Then open /etc/rc.local file with nano text editor,

nano /etc/rc.local

Now paste following line just before that line that says exit 0,

maldet --monitor /usr/local/maldetect/monitor_paths

Save & close file. Linux Malware Detect (maldet) will now start at every reboot in monitoring mode and monitor the directories specified in monitor_paths file.

 


   
Quote
Share:
Back to top button