Mac OS X and NIS … just not good friends

When I started using a Power Mac G4 running Mac OS X as desktop machine a year ago I decided to use NIS and NFS on the machine. That would allow me to share data easily and kept my personal file on my server which uses RAID and gets backed up.

Getting NIS and NFS to work wasn’t very difficult using Marcel Bresink’s excellent instructions.The first problem I encountered was poor NFS performance, about 2MB/sec over Gigabit Ethernet. Following the advise of a fellow NetBSD developer I tried using NFS over UDP. While this is usually slower and less reliable it fixed the problem in this case. Reading a large file via NFS now runs at 30MB/sec. The only remaining problem was that I could occasionally not log in after booting up the machine. This happened about once a week and restarting the machine via the login window usually fixed the problem.

Unfortunately the problem got a lot worse when I upgraded the hardware to a Power Mac G5. I wasn’t able to login after one out of three (re)boots. On at least one occassion the problem required half a dozen reboots before I could finally use the machine. I also experienced a new problem where my account would work but the home directory couldn’t be mounted. This error required logging in as a local user and removing the bogus home directory which got created because NFS didn’t work. The automounter would otherwise not mount my home directory even if NIS worked fine.

The situation became unbearable and I began to analyzed the problem. I tried modifying the NIS startup script with little success. After a while I realized that lookupd was causing the problems with NIS. It sometimes failed for no apparent reason to talk to the NIS server. The result was that either the NIS accounts were not available or that the automounter couldn’t load the NIS mount map and the home directories weren’t accessible. I finally figured out the sequences to get my Mac working when it was in that dodgy state:

  1. Login using a local account.
  2. Open a Terminal window and use sudo zsh to get system administrator privileges.
  3. Force a restart of lookupd with killall lookupd.
  4. Wait a moment and tell the automounter to reload its configuration via killall -HUP automount.

I became tired of doing that manually of course and finally wrote a shell script which did the job automatically. The scripts gets started from /etc/rc.local like this:

nohup /usr/local/sbin/fix-nis 25 >/tmp/fix-nis.log 2>&1 &

Using that brute force approach fixed the problem. If I can’t login after booting the machine I just wait a few seconds until the scripts teaches lookupd a lesson and can finally login and access my home directory.

I nevertheless wanted to know what causes those problems and posted an article in a german Mac OS X network related newsgroup. In the resulting discussion somebody pointed out that Marcel Bresink has added a section about Mac OS X Tiger related NIS bugs to his instructions. It seems that Apple introduced quite a lot of bugs with the integration of launchd into Mac OS X Tiger. I remember that the Solaris 10 on my company laptop at a previos job had similar problems because Sun had also invented a parallelised system startup with that operating system release.

So the good news is that my NIS setup at home isn’t broken. But the bad news is that there is no better solution than my brute force shell script. Let’s hope that Apple fixes these problems in Mac OS X Leopard.

Posted in Mac | 10 Comments

Wireless Security

Quoting from a dialog I had on IRC recently:

*Me* Your neighbour allows you to share his broadband via his WLAN?
*He* Yes, and we use a MAC address access list to stop other from doing the same.
*Me* But you don’t need an access list if you use WPA or WPA2 because it doesn’t approve the security.
*He* Oh, we are only using WEP because my neighbour’s old 802.11b WLAN card doesn’t support it.
*Me* He should really buy a better one to able to use secure encryption.
*He* Yes, he’s going to do that because my notebook with builtin 802.11g has faster Internet access than his computer now.

Wireless security is a hopeless matter because people just don’t care. 🙁

Posted in Computing | Comments Off on Wireless Security

We Will Rock You

While thinking about possible presents for my wife birthday’s last december I had one of my better ideas: I bought tickets for the Queen musical We Will Rock You. We wanted to see it ever since we spotted the posters in London’s tube stations. But we never managed to settle a date and order tickets in advance.

Yesterday the day had come and we were both full of expecation because we are both big queen fans. We took the train to London in the morning, had lunch add the borrow market and finally took the tube to the Dominion Theatre. Reading the program we bought I realized that the remaining members of Queen will celebrate their sixtieth birthdays soon. I’m therefore very happy that we went to their concert with Paul Rodgers in the Hyde Park in 2005. It was probably our last chance to enjoy at least Brian May and Roger Taylor performing live.

But let’s get back to the musical:

  1. The music was of great. No big surprise here. Thanks to the diversity of the songs Queen recorded over the years they could find the right music for every part of the show.
  2. The performers were great. I was especially impressed by Jenna Lee James who played the main female character Scaramouche.
  3. Besides good music there was a lot of british humour in it including funny references to current events. They even poked fun at the members of Queen.
  4. There were also touching moments dedicated to the memory of rock stars who died young: legends like Elvis Presley, Jimmy Hendrix and of course Freddy Mercury.
  5. The simple but taking story is about a world ruled by a powerful coperationg called Globalsoft. They control everything including the music business which is dominated by cloned boy and girl bands. Rock ‘n’ Roll and music instruments are banned. And only a few rebels are trying to bring both back.

My wife and I really enjoyed the time and are considering to watch the show a second time. If you like Queen’s music you must see it!

Posted in Music | Comments Off on We Will Rock You