Disable Caps Lock in Windows

Nice little reg hack to dsiable the Caps lock key in windows here.

HP Compaq 6910p Notebook

Laptop for reference HP Compaq 6910p Notebook

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 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 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.

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.