Author Archives: Thomas Szteliga

Configure Puppet agent service on Windows to send logs to file instead of Windows Event Log

By default the Puppet agent on Windows running as a service will send all logs to the Windows Event Log. If want to have these logs to be sent to a file, the service parameters have to be modified. This can be done by editing the value of ImagePath under HKLM\SYSTEM\CurrentControlSet\Services\puppet in the Windows Registry Read the full article…

MINIBIAN on Raspberry Pi and Pi 2 Quickstart

Connect your Pi with an ethernet cable to a switch and boot up. Connect to console using user: root and password: raspberry. Upgrade MINIBIAN: apt-get -y update apt-get -y upgrade Install packages: apt-utils, apt-file, raspi-config, usbutils, wpa_supplicant, crda, mc: apt-get -y install apt-utils apt-file raspi-config \ usbutils wpasupplicant crda mc Setup wlan0: cat <<EOF >> Read the full article…

Check for MySQL databases without existing DirectAdmin users

# Check MySQL databases without existing DA users. # Be careful, check twice before removing a DB. for dbuser in ` \ find /var/lib/mysql \ -mindepth 1 \ -maxdepth 1 \ -type d \ -exec basename ‘{}’ \; \ | cut -d’_’ -f1 \ | sort -u \ | grep -vE “^(da|lost\+found|mysql|performance)\$”`; \ do \ Read the full article…

Second and third display keep waking up after suspend

On my NVidia NVS 510 with 3 displays the second and third (or better the first and second) display were waking up every few seconds after being suspended. First I thought it’s a driver problem, so I’ve upgraded to the latest beta drivers. But then I’ve found somewhere a suggestion, that maybe the displays are Read the full article…

Solving large fonts problem in KDE with high resolutions on multiple displays

After upgrading my workstation with NVidia NVS 510 working on four HP LP2475w displays “rotated left” at 4800×1920, I’ve noticed really large fonts in KDE. Using System settings and changing the font size and dpi did not really help, because some apps had after that too small fonts, like KeePass (running via mono). The system-wide Read the full article…

Asus K56CB-XO100 and the right mouse button with Linux

On Slackware Linux the right touchpad/mouse button of an Asus K56CB-XO100 is not working as expected. This is caused by wrong psmouse module options and an incorrect mouse type used by the gpm daemon. The solution is very simple. Configure psmouse module options Create /etc/modprobe.d/psmouse.conf with the following content: options psmouse proto=exps Run mouseconfig and Read the full article…

Black screen in Netbeans embedded WebKit Browser – quick workaround

There is a “black screen” problem in Netbeans 7.4 embedded WebKit browser, this seems to be related to Bug 236961. The problem is caused by a canvas added by Netbeans at the end of the previewed page. My workaround is simple, I’m adding the following code to my jQuery enabled application I’m currently working on: Read the full article…

Call to a member function setPassword() on a non-object in /vendor/socalnick/scn-social-auth/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php

I was playing with ZfcUser together with ScnSocialAuth, ScnSocialAuthDoctrineORM and BjyAuthorize using a custom entity – mostly based on the User entity provided by BjyAuthorize – and ended up with the following fatal error: Fatal error: Call to a member function setPassword() on a non-object in …/vendor/socalnick/scn-social-auth/src /ScnSocialAuth/Authentication/Adapter/HybridAuth.php on line 441 This problem is caused Read the full article…

Migrating Roundcube from MySQL to PostgreSQL

If You think there’s an easy and fully automated way of migrating a Roundcube installation running for years on MySQL – to a PostgreSQL database – forget it. You will probably have to take a few steps before automation could be applied to this process. In this post I’m trying to describe all steps of Read the full article…

Missing `foo=bar` POST data line in Zend\Http\Request example of generating a formatted HTTP Request from a Request object

If You’re missing the foo=bar line in the output of the example Generating a formatted HTTP Request from a Request object, just add: $request->setContent($request->getPost()->toString()); right before: echo `$request->toString(); The original (not working) example (found here): use Zend\Http\Request; $request = new Request(); $request->setMethod(Request::METHOD_POST); $request->setUri(‘/foo’); $request->getHeaders()->addHeaders(array( ‘HeaderField1’ => ‘header-field-value1’, ‘HeaderField2’ => ‘header-field-value2’, )); $request->getPost()->set(‘foo’, ‘bar’); echo $request->toString(); Read the full article…

Too much content was extracted from the stream (* instead of * bytes) Zend\Http\Headers Object while trying Data Streaming with Zend\Http\Client

I was having fun with Zend\Http\Client and wanted to try Data Streaming for downloading larger files. But there was a strange problem – downloads were aborted and an exception was thrown with the message: Too much content was extracted from the stream (976 instead of 687 bytes) Zend\Http\Headers Object

Filtering/sanitizing IP addresses lists on command line

Sometimes You have to obtain via command line on a list of IP addresses and you need to be sure it will not contain any IP addresses assigned to the machine You’re working on – especially, when You’re planning to use this list during automated modification of firewall rules.

Extracting the public and private key from a PKCS #12 container using OpenSSL

Extract the private key from mycert.pfx: openssl pkcs12 -in mycert.pfx -nocerts -out my-private-key.pem Convert .pfx/.p12 to .pem: openssl pkcs12 -in mycert.pfx -out mycert.pem Extract the public key: openssl x509 -inform pem -in mycert.pem -pubkey -out my-public-key.pem

Apache is not starting and throws messages like “[emerg] (28)No space left on device: Couldn’t create accept lock” in error log.

Apache can not start and shows in error log messages like this: [emerg] (28)No space left on device: \ Couldn’t create accept lock \ (/var/log/httpd/accept.lock.24765) (5) but the partition is not full, it’s not a quota problem and yes – the partition is writable. So where is the problem?

DNS testing tools – check your DNS server security and zone configuration online

A small collection of online utilities designed for testing DNS server security and zone configurations. DNSInspect DNSInspect is a FREE web tool which checks your domain’s servers for common DNS and mail errors and generates a report with explanations how to fix them. intoDNS IntoDNS checks the health and configuration and provides DNS report and Read the full article…

Outdated Joomla websites with JCE used to attack Beneficial Data Processing Corp and Regions Financial Corporation

Seeing requests to //tmp/wegh.php in Apache logs is probably not a good sign. Few days ago I wrote about how important paranoid firewall-output filtering is on a shared hosting server, today I’ll take a closer look on the next Joomla hack found active today. This time the “hacker” tried to attack the IP addresses 161.113.4.6 Read the full article…

Subshell problems in Midnight Commander?

On one of my Slackware based vmachines the subshell in Midnight Commander was not working as expected. Pressing Ctrl + O worked only “partially”. Of course I was using the right shell (/bin/bash) and Midnight Commander was compiled with subshell support (an official Slackware package). # mc –version GNU Midnight Commander 4.8.4 Built with GLib Read the full article…

Seeing strange UDP connections to 216.82.176.7?

Today the CSF firewall on one of our servers controlled by DirectAdmin started showing blocked outgoing UDP connections to 216.82.176.7 on ports 25, 80 and 443. kernel: Firewall: *UDP_OUT Blocked* IN= OUT=eth0 SRC=X.X.X.X \ DST=216.82.176.7 LEN=1421 TOS=0x00 PREC=0x00 TTL=64 ID=12594 \ DF PROTO=UDP SPT=39792 DPT=80 LEN=1401 kernel: Firewall: *UDP_OUT Blocked* IN= OUT=eth0 SRC=X.X.X.X \ DST=216.82.176.7 Read the full article…

ConfigServer Security & Firewall (CSF) issue with natting to a remote PPTP server

One of my networks is protected by CSF, running on the router, and I noticed, I’m not able to connect from this network to a remote PPTP server (in this case it’s Poptop), while connecting from other networks, to the same PPTP server, is possible without problems. [me]—-[router with CSF]—-[Internet]—-[Poptop server] Of course the solution Read the full article…