Archive for November, 2006

Perl Binary

Posted in Fedora, Linux SysAdmin on November 30th, 2006 by Johan Huysmans – Be the first to comment

For a special task I needed to run a perl script on a specific machine, the problem was… there is no perl on that system.
This can be easily solved with the compilation of the perl script.

Fred tested the perl compilation with perlcc together with me. He has summarized the results in his “perl binary”-blog post. At the end he added the pp (Perl Packager) which also compiles perl scripts.

I tested this and at the first sight it worked fine, but at second sight some strange things happened.

The binary I created on my machine (Fedora Core 6) worked fine on my machine but gave a “Floating point exception” on any other machine. When I tested it on an other FC 6 it worked without any problems.
When the binary is created on an other machine it worked on all machines, including mine. I repeated this test with different machines (CentOs, Debian, Suse) and those worked fine. They also worked on the system without perl.

When comparing the binaries compiled on the different system I noticed that libresolv.so.2 shows up in the output of “ldd” only with the FC6 binaries.
When creating a chart of all systems with the check result, I added the glibc version of the system. It appeared that the version differs on the systems. On FC it was a newer version (2.5) then the other hosts (2.3).

I added glibc in my search query on google and I found following warnings on cpan.org:

Linux and other libc-based platforms
* Try to avoid running pp on a bleeding-edge version of the OS
* Older versions with an earlier libc won't work with new ones

This means that perl compilation with pp with the bleading edge version of glibc (2.5) may not work on other systems. If you compile it on a system with a more stable version of glibc, it will work on all systems. (or at least on the systems with the same glibc).

MediaWiki remote user authentication

Posted in Linux SysAdmin on November 17th, 2006 by Johan Huysmans – 28 Comments

A Mediawiki has it’s own authentication, the users and all user information is stored in the database. Our current infrastructure has our users stored in a central ldap database and the authentication happens by apache’s Basic Auth.

This means that when a user tries to access the wiki for the first time he has to authenticate to the apache, then he needs to create an account on the mediawiki and he has to login on the mediawiki. The other times he still has to login 2 times.

These 2 things (mediawiki registration and authentication) can go automatically, you only need to edit 1 file and add 1 file.
read more »

Dump script

Posted in Backup on November 2nd, 2006 by Johan Huysmans – Be the first to comment

I updated my dump script.

2 features are added:
* dump a package list of the rpm database (command: rpm -qa)
* dump the partition table (command: sfdisk -d)

The different dump-commands are now placed in a “if” structure, this means you can define at the top if you want to run that specific dump or not. The next thing I will change is to let the script decide you can dump something or not. So if the specific dump command exists it will run it otherwise it will just skip that dump-section.

You can find the dump script here. More Information about the dumping of the partition table can be found on MDLog:/sysadmin.