Tuesday, 30 October 2012

Reseting a pasword in Mac OS X 10.8 Mountain Lion


Well, I needed to reset a password on a newly bought iMac (they'd forgotten what they had originally put??).

I knew how to do it back in 10.4 but thought the method might have changed a bit. Anyway, found this nice article on it. Basically:
  1. Boot into Recovery Mode (hold down cmd + R)
  2. Go to Utilities > Terminal
  3. type:
    1. resetPassword
  4. a password reset facility comes up
  5. Reboot the machine!
Done.

A little bit insecure. I basically means anyone reading this article can reset anyones password and access their files (unless fileVault has been used which has a lot of issues with it)

Wednesday, 24 October 2012

iPad 1st Gen screen displaying horizontal gray band

I have an iPad which is displaying a gray horizontal band across 1/3 of the screen near the bottom. I was told that upon switching the ipad on one morning this band just appeared. After reading a few posts looks like it is a common occurrence with a batch of iPads brought in December 2009 which is about the time we brought ours.

It appears to be a display problem as when taking a screenshot everthing appears fine.

As it is out of warranty and applecare i have the option to repair myself. I found this helpful guide of how to replace the screen and glass. And hear is the price of a new LCD with glass (about £80). Here's one with just the LCD screen.

I shall update.

I've decided to test the theory by swapping the display assembly with another working iPad, as it involves little invasive action.

Friday, 12 October 2012

Firefox not picking up the wpad auto config file

I've decided to setup firefox on the new Windows image but it turns out it doesn't like the options:

  • Use system proxy settings
    • this is the one I prefer as I can set it using group policy/workgroup manager
  • Auto-detect proxy settings for this network
Whenever either of these are ticked you cannot browse the internet.

Had a quick search and think I've found the problem. The browser looks for the file:

http://wpad/wpad.dat

Now when I typed this in the address bar of; Safari, Internet Explorer and Google Chrome; they all downloaded the wpad.dat file. But Firefox was the odd one out as it just displayed the "Unable to connect" and "Problem loading page" errors.

Did a quick search and found this Knowledge Base Article describing how all other browser now use DHCP to help find this address, but Firefox only uses DNS. Also found it here in a blog and more importantly in Mozillas bug reports here (takes a while to load).

The fix apparently is to put a "DNS record for the WPAD server" (described here under 7.2.2)

Thursday, 11 October 2012

Imaging Windows XP on a Mac - filling (expanding) the partition

So, came to a machine today which I'd just re-imaged with windows XP using DeployStudio. Windows thought the partition was only 30Gb's  but was actually 110GB's. I had seen this before but never written down how to fix it.

First thing I tried was the Disk Checking utility. This did not fix the problem.

After this I didn't know what to do. I turned to google and found this forum answer. Turns out when re-imaging there is an option to "Auto Expand" windows to fill the partition but sometimes does not work. To fix, use WinClone. Unfortunately the latest version of WinClone now costs $19.99, but the older V2.2 was free. I eventually found WinClone V2.2 here.

You also need NTFSProgs so OS X can understand NTFS partitions. WinClone downloads them automatically, here is the link it uses.

Here's a screenshot of it in action:
WinClone Expanding windows file system

Go to Tools > Expand Windows file system.

Takes around 8 mins.

Worked. Cheers.

Monday, 8 October 2012

Setting all Apple Macs to use network time servers

So I wanted to change all the Macs here to use our specific network time servers so that their time is never out and so cause login issues. I did it by first finding the command line arguments, then making a shell script, then making a pkg file which the OS X task server sent to all the machines when they are powered on.

Here's the step by step guide:

  1. finding the command line arguments:
    1. sudo systemsetup -setnetworktimeserver your.time.server.ac.uk
    2. sudo systemsetup -setusingnetworktime on
  2. making a shell script
    1. make a new plain text document using "TextEdit"
    2. make the first line:
      1. #!/bin/bash
    3. paste the two lines from 1.1 and 1.2
    4. save as (untick "add .txt file extension) and put .sh at the end
    5. make it executable
      1. in terminal type:
        1. chmod 744 nameOfShellScript.sh
  3. make a .pkg file which runs this script
    1. I use Iceberg. Here are the screenshots:


    2. When done, go to Build > build
    3. navigate to the project folder in Finder and inside the "Build" folder you'll find the .pkg file.
  4. test it on a computer
  5. Send to all machine
    1. I use Apple Remote Desktop Task Server for this
      1. select the computers in a list
      2. click "Install Packages"
      3. select the package
      4. select "run this task from: The Task Server on your.task.server.ac.uk"
      5. sorted
    2. sorted
  6. sorted

Getting VirtualBox to use Bootcamp partitioned Windows XP on a Mac

So, I really wanted VirtualBox to use the Bootcamp partitioned windows XP. After a bit of trauling I found this but had a slight error "resource_busy" and found this with a reply sorting it out. Turns out you have to unmount the disk to create the .vmkd file.

  1. make a new machine
  2. when asked about disks, load up the terminal
  3. find the disk and partition with windows installed
    1. diskutil list
  4. unmount it
    1. I did this in disk utility
  5. change permissions on it
    1. chmod 777 /dev/diskXsY  (replace X and Y with numbers)
  6. go into the folder where your new VirtualBox machine is
    1. cd ~/VirtualBox\ VMs/VirtualComputerName
  7. make the .vmkd file
    1. sudo vboxmanage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename "winXP.vmdk" -partitions 3
    2. you have to find out how many partitions are on the harddrive. I've got 3
  8. change permissions of the files created
    1. chmod 777 winXP*
  9. in VirtualBox, select the disk file you created.
Sorted.

Turns out the error I got was from not reading the bit where you have to unmount it.

Thursday, 4 October 2012

sendLogon.app and installer

Well, after much troubles over getting NHR to also run sendLogon on startup, I decided to just make an application which ran the sendLogon script:

/usr/bin/sendLogon 145.xxx.xxx.xxx 5438 $(logname)



  1. I simply made it in Automator:
  2. Next I made an installation package to install it along with the sendLogon command program
I used Apple Remote Desktop's "Task Server" to install it on all managed machines. And finally I used Workgroup Manager to have it as a Login Item on the managed machines.

I think it works out better this way, as there is a little bit more control over it.