In a previous post I showed how to install the Windows Management Instrumentation (WMI) client for Linux (wmic
). In this post, I wish to show a few ways on how to query a Windows-based host using the WMI client.
Using WQL, we can query almost any aspect of the Operating System. Using the available WMI Classes (for example the WMI Win32 Classes), we can easily query performance indicators such as Memory Usage, Disk Usage or the status of a certain process.
Read the rest of this entry
With Debian 6, the Debian distribution made the jump to a dependency based boot sequence using LSB tags. So when you update your current Debian installation, you might encounter some problems when your scripts are not properly prepared. Such as the following message:
insserv: script vzreboot: service vzreboot already provided!
The full message reads like this:
Read the rest of this entry
When using a server with multiple external users, one thing that regularly comes up is that users want to access a folder on the server, such as the root folder for a webserver. This way every user can manage their files and upload new content. This can be achieved securely with SFTP, which uses the SSH protocol for file transfers.
In this article, I provide a simple script to create new users with minimal preparation and all correct settings. The text is based on the following article on debian-administration.org: OpenSSH SFTP chroot() with ChrootDirectory.
Read the rest of this entry
Since I started out with Linux (so about six years ago), I always used the Linux Logical Volume Manager (LVM) to partition my tables. First it was just because it seemed easier to configure my harddisks with it (also, the installer usually provided a nice option to do so), but in the last few months I had the possibility to work more with LVM and got to know some nice features.
One thing I regularly have to do is to extend an existing logical volume on a server. This article focuses on extending a logical volume with the help of LVM.
Read the rest of this entry
On one of our Debian hosts, we use bash scripts and cron jobs to automate certain tasks. One of these bash scripts downloads files from an FTP server and archives them. After upgrading the host machine to Debian 6.0.4, one of the bash scripts suddenly showed warnings:
/srv/foo/bar.sh: line 146: warning: here-document at line 140 delimited by end-of-file (wanted `EOF')
Whoops, so let’s look into it. The change was probably introduced with the new version of bash:
Read the rest of this entry
For our courses in linear algebra, we are using the GNU Octave software for numerical computation. Since I am using a MacBook Air for university, I had to install Octave on Mac OS X. I simply followed the steps described here and successfully installed gnuplot and the Octave software package. But when I tried to plot something with Octave, I received the following error message:
Read the rest of this entry
When setting up a new server in a highly secured network, one does not always have access to the Red Hat Network to download packages for the installation of the server. Often, a local repository is provided later on in the setup process.
This leaves us with the problem of installing the necessary packages for the Oracle database. Luckily, we can use the DVD we used for the installation of the Operating System to get all required packages.
Read the rest of this entry
Some services (such as MSSQL instances) include a dollar character ($) in their name. A few weeks ago, I had to add a service called “$02_JBoss Server” to our internal Nagios configuration. After searching through the Nagios documentation and FAQs, this is what I found:
For Nagios 3, add two backslashes and a second dollar (\$) symbol, like this: check_command check_command check_nt!SERVICESTATE!-d SHOWALL -l MSSQL\$$INSTANCE
The above example actually has a small error in it, because there is no second backslash (even though it says so in the description)!
The correct way to check a service named “$02_JBoss Server” is to use a definition like this:
check_command check_nrpe_args!CheckServiceState!ShowAll "\\$02_JBoss Server"
In the past weeks, I was responsible for setting up a new JBoss Application Server for a customer. One thing I had to do was to enable authentication via the customers existing Active Directory for SSO (Single Sign On).
When fiddling with authentication, one is always happy to find examples of existing installations. In this post, I give an example of how to configure LDAP authentication (in this case with Active Directory) in JBoss. While you can find extensive documentation on the JBoss website, I always like it if there is a specific example provided, so here it goes:
login-config.xml
Read the rest of this entry
So there I was. I just installed Nagios on a brand new Debian (6.0.3) host, I was greeted with the following error message after logging into the Nagios web interface and clicking a link that uses external commands:
Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'
What? Well, after making sure my configuration is correct, I figured that this must be some kind of permission problem…
Read the rest of this entry