• HP Compaq 6910p Notebook

    Laptop for reference HP Compaq 6910p Notebook (Broken link http://h10010.www1.hp.com/wwpc/us/en/sm/WF06a/321957-321957-64295-321838-89315-3357377.html)

    Specs:

    • 75Gb Disk
    • 2.0 Ghz Core 2 Duo
    • 1Gb Ram


  • exiqgrep - searching the eixm queue

    I’ve just had to delete a bunch of messages from an Exim queue and I found this to be useful:

    # exiqgrep -f billg@microsoft.com
    

    Will print out details for any messages from that address.

    To delete any messages from a person use the f as well as the i flags to print out just the message id, this can neatly be piped to xargs:

    # exiqgrep -i billg@microsoft.com | xargs exim -Mrm
    


  • Apache Allow From IP or password

    I can never remember the syntax to allow access to a directory from an IP or range of IP’s without a password but falling through to using a password from all other IP’s. The below works in a .htaccess file:

    AuthName "some name"
    AuthUserFile /some/htaccess.file
    AuthType Basic
    Order Allow,Deny
    Require valid-user
    Allow From 127.0.0.1
    Satisfy Any
    


  • VMware any-any patch

    I’ve had troubles with vmware on redhat/fedora in the past. (See here or here) But I’ve now found a one stop solution to putting VMware on all things RedHat or Fedora. Follow the instructions in this (Broken link http://www.vmware.com/community/thread.jspa?messageID=76957&tstart=0) VMware forum post. This has worked for me with VMware Server on Fedora 6 and 7 and also VMware Workstation 6 on Fedora 7. Thanks Petr!


  • Solaris 10 restarting services

    To restart things run:

    # svcadm restart ssh
    

    To list the currently known svcs use:

    # svcs
    

    Sun have a nice guide here on their BigAdmin site.


  • Changing IP address on Solaris 10

    I’ve recently been caught out whilst trying to change the IP on a Solaris 10 machine. It used to be the /etc/hostname.pcn0 (or whatever type of interface it was) had o match the entry in /etc/hosts. Now it seems this isn’t the only place you need to make the change, you also need to change the IP in /etc/inet/ipnodes as-well, which is the same format as /etc/hosts


  • SELinux tit bits

    I’ve just discovered you can switch selinux into Permissive mode whilst the machine is running

    This shows that we are currently enforcing:

    # sestatus
    SELinux status:                 enabled
    SELinuxfs mount:                /selinux
    Current mode:                   enforcing
    Mode from config file:          enforcing
    Policy version:                 21
    Policy from config file:        targeted
    

    To switch into permissive mood:

    # setenforce Permissive
    

    And another sestatus shows the change

    # sestatus
    SELinux status:                 enabled
    SELinuxfs mount:                /selinux
    Current mode:                   permissive
    Mode from config file:          enforcing
    Policy version:                 21
    Policy from config file:        targeted
    


  • vt1211 module for Centos or RedHat Enterprise 5

    I’ve a couple of machines running Centos 5 on Via Epia motherboards.

    Sadly kernel versions up to and including 2.6.18 dont ship with the required vt1211 (Broken link http://hem.bredband.net/ekmlar/vt1211.html) kernel module. This means that both Centos and Redhat Enterprise 5 lack the module required to gather sensors data. Because it is a bit of a chore to patch the kernel source and compile the driver any I compile I’ll keep here.

    i686 Kernels

    Documenting the use of this module is beyond the scope of this post, for information regarding that please see the home page for lm_sensors (Broken link ~~http://www.lm-sensors.org/~~).

    Many thanks to Lars Ekman for writing and maintaining this module!


  • Mysql OLD_PASSWORD authentication fix

    If you are using a older version of php connecting to a recent mysql (like os X Server 10.4 has) you will probably need to use the OLD_PASSWORD function in your SQL when creating the user or setting the password.

    Normally you might do something like this to set a users password:

    mysql> SET PASSWORD FOR root@localhost = PASSWORD('mypassword');
    

    Whereas if you see this message from php:

    "Client does not support authentication protocol requested by server; consider upgrading MySQL client"
    

    You will almost certainly need to use the OLD_PASSWORD function to encrypt the password, like this:

    mysql>

    SET PASSWORD FOR root@localhost = OLD_PASSWORD('mypassword');
    

    This is documented more in the MySQL Reference Manual (Broken link ~~http://dev.mysql.com/doc/refman/5.0/en/old-client.html~~).


  • Mac OSX Split files greater then 2Gb

    Just discovered that split (version 1.6) on Mac OS X Version 10.4.8 (PPC) does not handle files greater than 2Gb.

    I’ve found two work arounds to this problem, the first is the one I typically do, but it requires darwin (Broken link http://darwinports.opendarwin.org/) ports to be installed, I happen to have this installed everywhere anyway.

    Darwin Ports

    Simply ‘port install coreutils’:

    % port search coreutils
    coreutils                      sysutils/coreutils 5.97         GNU File, Shell, and Text utilities
    % sudo port install coreutils
    Password:
    --->  Fetching coreutils
    --->  Attempting to fetch coreutils-5.97.tar.bz2 from ftp://ftp.gnu.org/gnu/coreutils
    --->  Verifying checksum(s) for coreutils
    --->  Extracting coreutils
    --->  Configuring coreutils
    --->  Building coreutils with target all
    --->  Staging coreutils into destroot
    --->  Installing coreutils 5.97_0
    --->  Activating coreutils 5.97_0
    --->  Cleaning coreutils
    %
    

    Thats it, the only caveat is the new GNU split is named gsplit. So remember to type that when you want to split files over 2Gb!

    Compile from source

    The second method was found here. I like to keep things in my own logbook so I’ve put a copy of the instructions below

    1. Download the latest NetBSD split source from here
    2. Add the following somewhere near the top: #include
    3. Compile with either
    • For your architecture cc -Os -o split split.c
    • Or a Universal binary: cc -Os -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -o split split.c
    1. Copy the binary in place:
    $ sudo mv /usr/bin/split /usr/bin/split.apple
    $ sudo cp split /usr/bin/split
    $ sudo chmod ugo-w /usr/bin/split
    $ sudo chmod ugo+rx /usr/bin/split
    $ sudo chown root:wheel /usr/bin/split