Adriano Chiaretta

Fixing the “No updates detected in the log for the freshclam daemon” error

Have been banging my head on this for a while now. Logwatch kept reporting in his daily summary something along the lines of what below:

——————— clam-update Begin ————————

No updates detected in the log for the freshclam daemon (the
ClamAV update process). If the freshclam daemon is not running,
you may need to restart it. Other options:

A. If you no longer wish to run freshclam, deleting the log file
(default is freshclam.log) will suppress this error message.

B. If you use a different log file, update the appropriate
configuration file. For example:
echo “LogFile = log_file” >> /etc/logwatch/conf/logfiles/clam-update.conf
where log_file is the filename of the freshclam log file.

C. If you are logging using syslog, you need to indicate that your
log file uses the syslog format. For example:
echo “*OnlyService = freshclam” >> /etc/logwatch/conf/logfiles/clam-update.conf
echo “*RemoveHeaders” >> /etc/logwatch/conf/logfiles/clam-update.conf

———————- clam-update End ————————-

suggesting that either clam-update was not running or the log file location was misconfigured.

Checked all that a number of times, made sure the permissions were correct, no difference.

Finally I realized that there is an error in the date detection of the freshclam related script which comes with Logwatch 7.3.6, and the solution comes down to editing the file:

/usr/share/logwatch/scripts/services/clam-update

and at around line 89 (this on CentOS 6.5) replace:
$ThisLine =~ s/ $//;

with
$ThisLine = substr($ThisLine, 28);

Two minutes milk & yogurt mousse

Craving for a sweet, soft, chilly, low carbs & low calories dessert? Then this approach I perfected after a few tryouts might just be what you’re looking for, especially if you only have an handful of minutes to spare.

– Fat free milk: 50 ml of fat free milk
– Fat free yogurt: 7 to 9 teaspoonfuls
– Sugar substitute at taste

The yogurt can be either plain or flavored, and if you don’t mind a few extra calories low fat or whole milk and sugar in place of the fat-free choices above will work just fine.

Preparation

They say a picture is worth a thousand words, while a video is worth… not sure how many words. At any rate, here you go with the video whose lenght (a little over two minutes) is exactly the time it takes to get the mousse ready:

Tools and Tips

– Glass cup: this should be cone-like shaped, which appears helping the frother to produce as much milk foam as possible. Also, the cup should be placed in the freezer for at least 30 minutes before use. This will make the foam think and compact.

– Milk frother: my favorite is the Aerolatte, but cheaper alternatives (such as the $3 model I’ve recently spotted at Ikea) produce pretty good results as sell.

– Place the mousse in the freezer for 30 – 45 minutes for best results.

And now, on a side-note, for who wonders whether it should be “yogurt” or “yoghurt”, turns out both terms appear to be acceptable.

How to enable SFTP logging in Linux

Here are the steps necessary in order to have the SFTP subsystem of the SSH (secure shell) daemon log operations on disk.

1. edit /etc/ssh/sshd_confing and look for the line:

#Subsystem     sftp     /usr/libexec/openssh/sftp-server

Uncomment it and update it as follows:

Subsystem     sftp     /usr/libexec/openssh/sftp-server -l INFO -f LOCAL6

-l INFO instructs the sftp server subsystem of the sshd daemon to log events, while -f LOCAL6 tells it to use the corresponding facility code

2. edit /etc/rsyslog.conf and add the following rule:

# Save sftp-server mesages to sftp.log
local6.*                                                /var/log/sftp.log

3. restart the sshd and the rsyslog demons (/etc/init.d/sshd restart and /etc/init.d/rsyslogd restart — specific command might vary based on your Linux distro, and of course you need to be root or use “su” in order to issue them)

Moving forward sftp actions will be logged in /var/log/sftp.log

For specifics on the sftp server log options and type of messages logged see the related man page.

How to build the latest node.js RPM and install it on CentOS / RedHat / Fedora

If you aren’t familiar with node.js, it’s a platform whose goal is to facilitate building event-driven server side javascript services. Essentially it allows to run javascript on the server — services built with Node.js go to sleep after instructing the operating system to wake them if a connection is made, and each connection has a very small memory footprint.

I recently started getting into nodejs, and first thing to figure out has been the best way to install it on a CentOS virtual server I had around, and here’s a summary of my findings.

In order to install nodejs on RedHat / CentOS / Fedora the most common approach is to grab the latest sources tarball and build them, and the instructions for this are on the online wiki. This will install node.js as an unmanaged package, making upgrade or uninstallation at times not super straightforward.

Which is why, on RedHat based distros (such as CentOS) I prefer going for handling software installations through RPM. In the past there were some ready-made node.js RPMs, but no new ones have been produced after version 0.6.18 (and we are now at 0.8.x).

So I went for building the RPMs myself, and listed below are the steps I went through.

– If your CentOS box doesn’t have compiler related components, install them with yum as usual:

yum groupinstall “Development tools”

– Install also the  gcc-c++ build tools (needed by the RPM build environment)

yum install gcc-c++

– Setup the RPM build environment, following what outlined on the CentOS wiki — afterward your home user’s folder show include the following subfolders:

– Download the latest node.js sources in the SOURCES folder

curl -sR -o ~/rpmbuild/SOURCES/node-v0.8.14.tar.gz http://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gz

– In order to build an RPM you’ll need its definition (.spec) file, and someone out there is kind enough to maintain one up to date with the latest node.js versions. Download it in the SPECS folder:

curl -sR -o ~/rpmbuild/SPECS/node-v0.8.14.spec https://github.com/kazuhisya/nodejs-rpm/raw/master/nodejs.spec

– At this point you’re ready to fire up rpmbuild:

rpmbuild -ba ~/rpmbuild/SPECS/node-v0.8.14.spec

– Depending on how fast your machine is, after a few minutes unless surprises the build and packaging process will complete and under ~/rpmbuild/RPMS/<architecture> you’ll find the node.js binaries and source RPMs.

– In my case, being the CentOS box a 64 bit one, I found what was looking for at: ~/rpmbuild/RPMS/x86_64/nodejs-0.8.14-1.el6.x86_64.rpm

– At last, time to install node.js:

rpm -ivh ~/rpmbuild/RPMS/x86_64/nodejs-0.8.14-1.el6.x86_64.rpm

– once installed, you can verify if things went correctly by checking that the “node” executable can be found within the path (doing a “which node”) and node –version which should output the version of the node binary just installed.

If you wish to cut a few corners and avoid the steps above, you can find the node.js 0.8.14 RPMs at this location (note that they have been built on an x64 CentOS 6.3 box — haven’t tried them on other versions or distros).

Sweet and creamy yogurt based mousse

Here’s a recipe for a 15-minutes preparation mousse, resulting in a sweet, creamy, and great tasting dessert, without the classic mousse ingredients (such as whipping cream, ice cream, etc.).

Ingredients:

– 500 gr (2.5 cups) of fat free yogurt
– 100 ml (half cup) of fat free milk
– sugar sweetener at taste
– powdered drink mix, such as the ones from Hawaiian Punch — pretty much any of them works great, just a matter of picking a flavor you like. Orange Ocean, Berry Limeade, and Wild Purple Smash being my favorites. Instant coffee works great as well.
– 4 or 5 sheets of gelatin for cooking

Tools:

– mid size glass jar
– electric whip

Preparation:

– Place the glass jar in the freezer for at least 30 minutes before starting
– Place the sheets of gelatin in cold water, and while the sheets gets soft…
– Warm up in the microwave about 100 ml of milk, making sure it doesn’t get too hot
– Put the sweetener in the milk and mix it up with a spoon, then melt in the milk the gelating sheets, mix for a few minutes until the components are blended together. Then leave it standing till it cools down, mixing from time to time to prevent it from becoming solid (since the gelatin is going to solidify again once it reaches room temperature)
– grab the jar from the freezer, and empty into it the yogurt, then put in the milk w/gelatin and sweetener prepared above, and the flavor
– whip up the compound till it doubles up in volume. It usually takes 3 to 5 minutes of whipping to get the compound shown from filling about half of the jar, to completely fill it as shown in the pictures.
– once satisfied place the resulting mousse in smaller containers to make it easier serving, then place it in the fridge (or in the freezer if you plan to store it for longer), and let it stand there for at least a couple of hours, or till tick, before serving.

Variations on the theme:

– Flavors: instant coffee, or other powdered spices are all great alternatives. For example cinnamon either alone or mixed with the orange flavor makes for another great option.
– Milk and yogurt can be regular rather than low or fat free, in which case they’ll make the compound grow up even more when whipping. And regular sugar can of course be used in place of the sweetener.

Serving suggestions:

– the mousse can be enjoyed as-is, or garnished with fruits including peaches, strawberries, etc.
– if stored in the freezer, let it stand at room temperature for at least 30 minutes before serving, to allow it soften up.

My favorite Firefox extensions grouped in an handy collection

Firefox collections are an easy way to keep up to date with add-on sets created by other users. And if you wish to have a glance at the add-ons I currently carry along with Firefox you can head over to:

https://addons.mozilla.org/en-US/firefox/collections/adri72/my-favorites/

which I plan to update any time I remove or add a new add-on to my Firefox installation.

The collection is a mix of add-ons related to hacking, web development, SEO, and general ui or usability tweaks.

Am I missing out on some other great add-on? Share your thoughts in the comments!

 

How to remove old and hidden device drivers from windows

Here’s a quick rundown on how to get rid of unused / old / hidden device drivers in windows (on Windows 7, but should work pretty much on any other version) – RPN5VQ7EECJQ.

Anytime you add a device and windows asks you for a driver, or looks on the internet and finds the driver for you, once installed, chances are it will stay around for good. And what happens at times is that when you connect some other device, the wrong driver gets picked up automatically among the ones you have already installed.

Typical scenario? You connect an android phone or tablet via usb to your pc, the device has “usb debugging” enabled, but despite what you try out, “adb devices” won’t show. Chances are the wrong adb interface driver is being used for your device.

So here’s how to get rid of unused drivers (i.e. devices not shown when disconnected):

– Add the environment variable devmgr_show_nonpresent_devices to your user or system variables, and set its value to 1 (command prompt -> control.exe sysdm.cpl,System,3 then press “Environment Variables” to get to the dialog where to add what above).

– Launch the device manager (command prompt ->  devmgmt.msc) then menu -> view -> show hidden devices. At that point you’ll be able to see any previously connected device, right click on it, and select “uninstall”. In the dialog that appears make sure to check “delete the driver software for this device”.