Cronjob: Running KLAMAV in SUDO mode?

Dear security enthusiasts,

I have been trying to set up KLAMAV to run as a background service once I log into KDE, but apparently KLAMAV only works when running it without SUDO - but then no files in the ROOT-Directory are able to be scanned. What is the correct way to achieve the goal I have set with my thread title? In short, I want to:

  • Launch KLAMAV as a background service (showing only the Icon in the taskbar) when looging into KDE
  • Automatically update the virus defintion databases once I log into KDE
  • Perform a FULL scan (including all ROOT directories) once I log into KDE

How to achieve that? I’ll give +REP for anyone providing a small tutorial for me here.

SecUpwN

It is nonsence to run a porgram that tries to detect MicroSoft Windows virusses on your system directories. The only reason that you might want to run a virus detecting program is on directories where you have mail that you receive and send further on to MS Windows systems (and when you want to deliver a service of virus dtection to the owners of those systems).

In fact when you do not run a mail server on the system, the idea of running such a program is rather futile IMHO. In fact not many Linux users run such programs.

And it is of course a bit against a Unix/Linux logic of it being a multi-user system, to start system functionality when a user (all users, or only the one you are talking about?) happens to login in KDE (not in any other desktop environment?).

Especially as Klamav has not been maintained for more than 5 years, and was KDE-3 only. It was useful though for manually checking out dubious files sent from MS users.

We run the ClamAV dæmon on our Postfix mailservers to write warning into the subject of affected messages – mostly it catches phishing mail. When we had customers with mixed environments, we ram clamd on files coming into Samba shares. Both Postfix and Samba servers provide for integration. Kmail can filter incoming messages through clamd, but this slows checking new mail in considerably – best done on the server.

Ok, fair. Let’s just say I want to run some pürogram that gets updated constantly and always runs the latest antivirus defintions against USB sticks and everything I connect to my computer - would you please be so kind and drop a good recommendation for a program with a neat GUI? Thank you ahaead!

On Tue 22 Apr 2014 02:46:01 PM CDT, SecUpwN wrote:

eng-int;2638378 Wrote:
> Especially as Klamav has not been maintained for more than 5 years,
> and was KDE-3 only. It was useful though for manually checking out
> dubious files sent from MS users.
Ok, fair. Let’s just say I want to run some pürogram that gets updated
constantly and always runs the latest antivirus defintions against USB
sticks and everything I connect to my computer - would you please be so
kind and drop a good recommendation for a program with a neat GUI? Thank
you ahaead!

Hi
Install clamtk from the security repository?
http://software.opensuse.org/package/clamtk

AVG Free for Linux is another.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Which of these two do you personally recommend? Maybe you have a smarter solution for running a full scan once the computer is fully booted up and I’m logged into KDE? I just want5 to make sure nothing creepy is hiding on my system and no USB-Sticks or other hardware connected to my computer is infected. If you could tell me how to enable ClamTK to silently run in the background without any popups and scanning ALL directories (including the ones in ROOT), you’ll earn a +REP, @malcolmlewis. :slight_smile:

Most do not run AV stuff it is only useful to check MS stuff

I doubt that any auto scan an inserted USB but you could set that up I guess by modding the rules.

On 2014-04-22 16:46, SecUpwN wrote:

> Ok, fair. Let’s just say I want to run some pürogram that gets updated
> constantly and always runs the latest antivirus defintions against USB
> sticks and everything I connect to my computer - would you please be so
> kind and drop a good recommendation for a program with a neat GUI? Thank
> you ahaead!

Clamav does get automatically updated at the intervals you define - and
you do that as ROOT, not in KDE.

The configuration is in file “/etc/freshclam.conf” and
“/etc/clamd.conf”. You have to enable the service “freshclam” for the
updates to occur.

Of course that there is not GUI.

AND of course it does no automatic checking of USB sticks or anything
else. You do that yourself when you want to it, manually. Or you might
script it up yourself, if you insist…

This is Linux, so forget what you new about security from the Windows
world :slight_smile:


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

On Fri 09 May 2014 07:16:01 PM CDT, SecUpwN wrote:

malcolmlewis;2638442 Wrote:
> Hi
> Install clamtk from the security repository?
> openSUSE Software
>
> AVG Free for Linux is another.
Which of these two do you personally recommend? Maybe you have a smarter
solution for running a full scan once the computer is fully booted up
and I’m logged into KDE? I just want5 to make sure nothing creepy is
hiding on my system and no USB-Sticks or other hardware connected to my
computer is infected. If you could tell me how to enable ClamTK to
silently run in the background without any popups and scanning ALL
directories (including the ones in ROOT), you’ll earn a +REP,
@malcolmlewis. :slight_smile:

Hi
If your not running a mail server, then not a lot to worry about, if
you install something (as root user) not from what you consider a
‘reputable’ source… well as they say ‘Let the buyer beware’.

Now in saying that stuff you download as your user (as opposed to root)
into directories you have set permissions on outside of your home can
be scanned by your user, no need for sudo (which I detest, much prefer
su -), easy for you to set a cronjob. On demand scanning, well a script
or udev rule could do that.

As other have indicated, setup freshclam to update the definitions,
then run clamscan.

I use neither product, so YMMV…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!