Craig Box's journeys, stories and notes...


Posts Tagged ‘sysadmin’

"The specified directory service attribute or value does not exist" connecting to Microsoft Exchange IMAP

Monday, May 21st, 2007

Are you getting "The specified directory service attribute or value does not exist." when connecting to Exchange IMAP? Wait a while. This error will go away - if you've just mail-enabled your account, Exchange will accept the username and password now, but it will take a few minutes for the mailbox to actually catch up.

Ruby "gem cleanup" returns "Unknown command cleanup"

Friday, May 18th, 2007
root@redhut:/usr/lib/ruby/gems/1.8# gem cleanup
ERROR:  While executing gem ... (RuntimeError)
    Unknown command cleanup

It's a bug in 0.9.3, and it will be fixed in an upcoming release.

Access 2003 fires up Windows Installer every time you run it

Monday, April 30th, 2007

Found an interesting problem this morning - Access 2003 fires up Windows Installer (msiexec.exe) every time you start it, and for users without administrator rights, it just doesn't go.

After looking at dozens of newsgroup posts and trying a few solutions, I finally had enough debugging information to find the solution that worked: registry keys are missing from HKLM\Software\Microsoft\Jet\4.0\Engines. Copy them from another machine (changing paths where required) and it works again!  Would of course love to know what caused a bunch of registry keys to just disappear...

For those interested, I found that msiexec was writing to a log file using Filemon, and the log file contained the error "Cannot Open Jet XL ISAM registry key" - descriptive enough to find the solution.

LVM bug on Feisty

Friday, April 27th, 2007

Once upon a time, there was a race condition between udev and device-mapper (the kernel interface used for EVMS and LVM2). DM would create and destroy devices regularly, say in the action of creating an LVM snapshot, and udev would say "ooh, shiny new device created" and try and do stuff with it, only to find it had gone away.

For some time, the fix for Ubuntu was a udev rule instructing it to ignore dm-N devices, as such:

KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"

All well and good, until they fixed that bug in Feisty. Now, if you still have that option in your udev rules, you will get LVM snapshots taking 10 minutes to create, and you'll also get LVM not starting properly at boot.

Check your workarounds when you upgrade packages. Sometimes, they not only don't work around any more, they cause all new problems.

Gray boxes when viewing Java applets

Wednesday, April 25th, 2007

Do you find you get gray boxes when you're looking at a web page with a Java applet (such as the Companies Office or JavaTester)?

You know you have the Sun JVM installed correctly, there are no traces of the Microsoft JVM, the plugin exists, but you can't see it in either Firefox or IE?

I had this problem for some time, and have finally found the cause - I have a custom transform for deploying Java, which turned off automatic updates, set the default JVM, etc, and also accepted the EULA.  As of about 1.5.0 Update 6,  setting EULA to 0 means that the JVM looks for EULA.DLL, doesn't find it, and silently dies.

Don't set the EULA property to 0 anymore. Ignore it.

You also used to be able to turn off the Automatic Updates in the properties table, but you can't any more.  You have to edit the MSI to run a registry script as the last action, and even then there are reports that Java will create the links on first-run.  I don't want my workstations getting a pop-up message saying Java will update when I carefully select the version to deploy, thanks Sun!

ProfileTool beta released

Wednesday, April 25th, 2007

ProfileTool screenshotI don't often write code, but I do find it's a good complement to cricket watching. So, in honour of New Zealand playing Sri Lanka in the World Cup semi-final, I'm proud to announce the release of the first public beta of the IT Partners ProfileTool.

ProfileTool lets you take a Windows 2000 or XP user's profile and assign it to a different user, without having to copy any files or perform any manual procedures.

This is a common task for people who are taking a network of PCs that have not been on a domain, and joining them to one; or if you replace a domain controller without keeping security information, which is sometimes done on sites upgrading from a badly installed SBS 2000 installation to a nicely installed SBS 2003 installation.

It also has useful features for deleting a profile off the disk/from the registry, and changing profiles from roaming to local, replicating the features of the User Profiles capplet.

The source is available under the Mozilla Public License, with the implication of "Do what you like with this code, but if you improve it, I'd like your source to come back to me please".

Some housekeeping

Saturday, April 14th, 2007

I'm going on a big trip in a few months, and figure it's a good time to start planning a bit more actively.

I've used the "Getting Things Done" methodology in my e-mail for a while (basically: your inbox should always be empty, you should have an "Action this" folder and a "Reference" folder, and you should either deal with an incoming e-mail immediately or file it into one of these two folders for later processing).  It seems like it might be fun to try it a bit more with the things I need to arrange before I go - you really do have to break things down into small steps when it's "move half way across the world for fun".  So I'm looking at Tracks, a GTD program written in Ruby on Rails.

Before setting this up though, I needed to play with my web host a little, so have categorized my posts to this site.  This crosses something off my aforementioned list-of-things-to-do, and also means that I will be a bit easier to read on planet.geek.nz, where I am now showing up.  Also, I'll probably do the whole Postcards from Uncle Travelling Matt thing, and I'm sure my Mum will find posts about Exim a bit over her head.

I've also seen a lot of people using Google Calendar, and now there is a way to get Thunderbird to use it directly, and you can publish stuff to the web in a neat fashion, I might see if it can arrange my trip for me.

Any other suggestions are welcome, bearing in mind I will need them to be easily accessible from anywhere.

Copying file permissions with robocopy

Tuesday, February 13th, 2007

I like using rsync to copy files between PCs, even on Windows. You get all the niceness of copying when the files are in use, and then only doing a small synchronization when they're not, to get a complete copy.Doesn't handle Windows file permissions well though.

Enter Robocopy (available in the Resource Kit). But I've already got the files?

robocopy source dest /s /copy:sou /is

Copies only security, owner and auditing information. Very handy.

MAPI error when sending e-mail from MYOB

Thursday, December 21st, 2006

"Cannot get the function address for MAPILogon from MAPI32.dll. Please check your MAPI installation."

Nothing on the web about this one (one other person with the same problem), but a simple fix. There is a 'fixmapi.exe' in your windows\system32 directory. Run that, and MYOB starts e-mailling fine again!

Everything about Exim

Wednesday, November 29th, 2006

Courtesy of Daniel, one excellent Exim cheatsheet.