October 2008
Monthly Archive
Monthly Archive
admin 22 Oct 2008 | : IT Stuff, Windows
One problem I’ve been having recently with MS WinXP workstations connecting and authenticating to a Samba PDC is that the workstation cannot authenticate to the PDC and download the roaming profile (it uses the local cached copy of the profile instead). The problem seems to be occurring quite frequently with a new generation of “power efficient” workstations from several different brand name manufacturers although I did have experience of this with some workstations a couple of years ago.
What seems to happen is that the network does not startup before the Ctrl+Alt+Del and login dialog appears. If the workstation is left for about 5-10 minutes the problem usually goes away. Occasionally though the problem becomes so persistent that no matter how often you reboot and regardless of how long you wait the PDC remains uncontactable. The problem is intermittent and inconsistent, for some workstations it will always happen, for others it only appears sporadically.
How to get around it? I’ve found that forcing windows to start its networking synchronously during the initial workstation startup seems to fix the problem. Making this happen requires a change to registry settings so save the following with a filename of <somefile>.reg …
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon]
“SyncForegroundPolicy”=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
“SyncForegroundPolicy”=dword:00000001
According the docs at Microsoft’s Technet site setting this value to dword 1 causes the operating system to “Always wait for the network at computer startup and logon.” Why two different registry settings? Microsoft’s docs say that the first entry in the Policies section of the registry is all that is needed but when inspecting a workstation registry one day I found this actual attribute (with a setting of dword 0) in the second branch of the registry … “so to be sure, to be sure” I’ve added it in both locations.
admin 22 Oct 2008 | : Renewable Energy
I’ve been looking at options for more compact (read unobtrusive) setups for generating electricity from wind power and came across this interesting article on Windbelts. They also include some documentation as well as details on how to build an experimental version of a Windbelt :=)
admin 22 Oct 2008 | : IT Stuff, VMWare, Virtualisation
I know, you’re asking why would anyone want to do this? Well the answer is that the version I have to work with (VMWare ESX 3.0.2 Starter Edition) does not include support for cloning VMs!!!
Firstly you need to read the excellent notes posted by Mario at http://www.mariospina.com/braindump/ on cloning VMWare ESX 3.0.1 by hand. In addition to the steps that Mario lists in his notes, I found that:
I should also add that these instructions seem to work OK on VMWare ESX 3.0.2.
admin 21 Oct 2008 | : Databases, IT Stuff, Photography, Renewable Energy, Solaris, snmp
Postgres triggers are created in 2 stages, firstly you create the trigger function then you link the function to the trigger event. In this sample code a function that fires during before an INSERT event updates a column in the table where the data is being inserted. The function uses an internal (SQL92 compliant) string manipulation function to create the additional data that is required to complete the insert. The column has been defined as char (8), the data being manipulated is a postgres date type and must be cast to a text type. Note also that text types are indexed starting at a base of 1 (not 0 as with ‘C’ character arrays).
CREATE OR REPLACE FUNCTION set_initial_pass() RETURNS trigger AS $set_initial_pass$
DECLARE
yyyy char(4);
mm char(2);
dd char(2);
BEGIN
yyyy := substring(cast(NEW.dob as text) from 1 for 4);
mm := substring(cast(NEW.dob as text) from 6 for 2);
dd := substring(cast(NEW.dob as text) from 9 for 2);
NEW.initial_code := dd||mm||yyyy;
RETURN NEW;
END;
$set_initial_pass$
LANGUAGE 'plpgsql' VOLATILE COST 100;
ALTER FUNCTION set_initial_pass() OWNER TO script;
Now create the trigger and attach the function above.
CREATE TRIGGER set_initial_pass
BEFORE INSERT
ON person
FOR EACH ROW
EXECUTE PROCEDURE set_initial_pass();
This example was created using pgadmin III.