|
Scan the home directories and throw the results in an output file.
for i in `awk `!/nobody/{print $2}' /etc/userdomains | sort | uniq`; do; /usr/bin/clamscan -i -r /home/$i; done; >> /root/infection
Now this is better to run in screen as on larger systems the scan can continue even after you have logged out. The user can simply check /root/infection for the results.
Note:
the "-i" switch for clamscan simply says to print results of infected files only the "-r" switch for clamscan simply says to scan recursively.
The results will look similar to the following:
/home/ahazygc/public_html/vb/cpstyles/vBulletin_MS_Sans/index.html:
HTML.Iframe-32 FOUND
etc...
You can use these switches to remove, move, or copy the infected files;
--remove[=yes/no(*)] Remove infected files. Be careful!
--move=DIRECTORY Move infected files into DIRECTORY
--copy=DIRECTORY Copy infected files into DIRECTORY
|