Checkpassword-0.90 Compilation Error on Fedora Core 3

Ok now next problem that I ran into in trying to get qmail running on the distrubution is that checkpassword-0.90 doesnt want to compile and looking on the web there is 1 arabic website explaining how to get around this which I cant understand but with again more pain I have finally cracked it.

In the source directory of checkpassword you will need to change the error.h file to include errno.h just after the line extern int errno like so…

extern int errno;

#include

then recompile and everything should work. 

IPTABLES doesn't work on initial boot

Now for a long long time I have been perplexed by why my firewall never works on my linux boxes on initial boot. 

When you run iptables –list is shows all the rules but never works until you run it again under the root account.  Now I finally got around to finding out why and its because the ipv4 forwarding is being reset somewhere down the boot chain.  Yep I found it, what you need to do is edit /etc/sysctl.conf and change the net.ipv4.ip_forward = 1 as this is set to 0 by default and switches off all forwarding used in any firewall script.

Now I did have the forwarding set in the script but the sysctl appears to run after all the startup processes.

Hope this helps as it certainly has been puzzling me for sometime.

FTP on Linux Freezes on command – ls

Something that I was suffering from when I tried to use ftp on linux, everytime I tried to do ‘ls’ to list the files FTP would freeze and not seem to do anything.

After quite a lot of pain, I noticed that a few of the important modules had not been loaded for the firewall – IPTABLES.  You must have the following modules loaded or built into your kernel for FTP to work through the firewall …

  • ip_conntrack
  • ip_conntrack_ftp
  • ip_nat_ftp

if you want to load them as modules then use modprobe.

Getting the Source Code for the Kernel of Linux Fedora 3 Distribution

Fedora no longer installs the source for its installations so if you need to rebuild the kernel you will need to get the source the easiest way is as follows:

  1. up2date –get-source kernel
  2. Install kernel-.src.rpm (given the default RPM configuration, the files this package contains will be written to /usr/src/redhat/) [NOTE: if this fails you should find the kernel src rpm from your up2date and download it manually and then use rpm -i ]
  3. Change directory to /usr/src/redhat/SPECS/, and issue the following command: rpmbuild -bp –target= kernel.spec (Where target is the desired target architecture.)
  4. On a default RPM configuration, the kernel tree will be located in /usr/src/redhat/BUILD/.
    In resulting tree, the configurations for the specific kernels shipped in Fedora Core 3 are in the /configs/ directory. For example, the i686 SMP configuration file is named /configs/kernel--i686-smp.config. Issue the following command to place the desired configuration file in the proper place for building:
  5. cp ./.config
  6. Issue the following command:  make oldconfig if you want to use the oldconfig or make menuconfig if you want to put in new stuff

then read the readme.txt file which comes with Fedora for building but normally do the following

  1. make
  2. make modules_install install

this now updates grub (if your using it) automatically

Building the Linux-ATM software on Fedora Core 3 on a VIA C3 Processor

Recently I built the linux-atm software, which is an atm utility which allows me to use my pci ADSL card on linux.

The latest release is version 2.4.1 which I pulled down off of sourceforge, and I then tried to compile it.  This is what I fell fowl of..

1. The source has four compilation errors which are at lines with default: in the case statements these need ; after them, you can either edit the four bits of source code yourself or get a patched version of the code from here.

2. Then I kept getting the error ‘storage size of req is not know’ and ‘invalid application of sizeof to incomplete type atmif_soic’ which I realised that I had the paths to my kernel source incorrect.  Now I put in a symbolic link to the source so /usr/src/linux pointed to /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/include [ which is where the source really was ].  So to correct this error I typed this before running the configure of linux-atm.

CFLAGS=-I/usr/src/linux ./configure

and that got me over that problem.

3.  Then I got the error ‘config.h:6:2 error including kernel header in userspace use the glibc headers instead’ in atmdev.h to get around this I changed the line config.h to autoconf.h

Then it all worked and everything was installed into /usr/local/bin and /usr/local/sbin.

Hope that has helped someone.  The linux-atm package has been around for sometime but I didnt think the documentation or notes about how to change the path to pick up your distributions source code was that clear.

Terminal Services and Licensing: No Terminal Server License Servers

Had to add some new terminal server licenses today for a client of mine and had a whale of  a time.  Installed the licenses which seemed to work no problem, then when I tried to connect to the remote machine kept getting the error that it couldnt connect due to “No Terminal Server License Servers”.

Then tried to ring Microsoft to see what they would say about it, firstly normal thing, ring a number that my license reseller gave me and go through to India or somewhere similar, and they were license activation rather than license help, the guy couldnt even understand me saying “can you give me a techinial support number”.  Then when he did understand me the other number was also somewhere else in India who said yes they could help me but I would have to purchase some technical support, now I know you dont get nothing for nothing but I have just purchased licenses surely I should be eligable for some help installing them oh no !!  So basically decided to try to fix the problem myself with the aid of google. 

Any way back to the problem, it would seem that the terminal services manager on the box couldnt resolve where the terminal services license server was in the domain so I had to tell it specifically by adding a registry key to that effect.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

\TermService\Parameters\LicenseServers\

in my instance I put the ip address of the license server rather than the netbios name and rebooted and worked a treet.

PHP5, MySQL, IIS and WINDOWS 2003 Server

Had some bother with the extensions of php5, php_mysql.dll and libmysql.dll under my latest installation on windows 2003 server.  When using the mysql_connect function to connect to a mysql database kept getting the error message

“mysql_drop_db could not be located in the dynamic link library libmysql.dll”

Now I had moved the libmysql.dll into the c:\windows\system32 directory, uncommented the extension in php.ini but was still getting this message, eventually realised that the new libmysql that comes with versions 4 & 5 of mysqlsql dont have these functions in them any more.  Therefore when you use php5 you must put libmysql.dll from the php5 zip file into the windows directory otherwise you get the above error.

I am not sure if you will lose functionality or not by doing this as the mysql engine will still use what ever version is in mysql/bin (from installation) but the current version php5 is compiled against mysql version 3 and still needs the function defs of that version.

CRUD why you cant afford it

Looking for details on asp.net 2.0 and its official release date I stumbled upon the article on MSDN about “CRUD why you cant afford it”,  this article talks about everything that I have disliked about CRUD for a long time. 

I have never really talked up about it though as most people rave or say “you must have CRUD”, when having written systems with and without CRUD, I dont believe it works that well for the reasons the author of the article mentions. 

The components at Tesco.com were built around exactly what we were doing rather than having generic CRUD methods and this seemed to work very well.

The MSDN article can be found here

http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnbda/html/CRUD-afford.asp

Fedora Core 2 installation patch for Epia Mini-ITX

As you may be aware the original Fedora Core 2 installation will just keep rebooting on an Epia Mini-ITX machine.  There are many newsgroups articles about this subject but I believe that they are all a little confusing so here is what I had to do to install Fedora Core 2 on to my Epia Mini-ITX CL600 machine.

First download the patch from http://people.redhat.com/arjanv/c3boot-2.iso and burn it on to a cd, then boot off of the new burnt cd.

The next set of instructions assume the text version of the installation

  • Go into the text installation by typing linux text at the prompt
  • Keep going through the installation until you get a warning message that the fedora disc is not in the drive, swap the original Fedora Core 2 disc 1 back into the drive.
  • Go through the normal installation steps for Fedora Core 2 until it says the installation is complete, then remove the CD then type Ctrl-Alt-F2 to get a console window.
  • The original Fedora Core 2 disc had already ejected so replace that with the patched CD that you burnt before starting the installation.
  • I then made a directory in /mnt/sysimage called source.
  • I then mounted the patched cd onto that directory [Note: the cdrom device is in tmp on my installation not /dev like other instructions say]  mount /tmp/cdrom /mnt/sysimage/source -t iso9660
  • Then chroot /mnt/sysimage
  • rpm -Uvf /mnt/sysimage/source/kernel*
  • once that has finished type Ctrl-Alt-F1 to go back to the original installation
  • Reboot as per original installation and it should boot into a working kernel

Got TWiki working on IIS6.0 under Windows Server 2003

At the weekend I had a go at installing TWiki running on IIS6 under windows server 2003.  Eventually with my old Perl book in one hand and a mixture of these articles below I got it going…

http://twiki.org/cgi-bin/view/Codev/CookbookWindowsIISSetup
http://twiki.org/cgi-bin/view/Codev/TWikiOnWindows2003

I didnt use cygwin in the end I used the following…

ActiveState Perl 5.8

Windows Binaries of RCS (can be found on the GNU RCS site)

I wanted to authenticate users so I have used windows authentication which works fine but it does mean that users cant register themselves and then start using it without the user being added to windows box manually by the Administrator.  If any one has any ideas how to get around this I would be most obliged.

The tool itself is great and one of the best wiki tools around, as it is very mature now.

If you want to ask me any questions, please do..