Category Archives: Networking

MyBook World Edition – Time Machine – OSStatus Error 2

If Time Machine is unable to connect to your backup disk with an error message containing “OSStatus Error 2″, then check the permissions on your NAS.

SSH as root into your MBWE and check the permissions for /var and /var/lib.

Use chmod 755 on /var and /var/lib to apply the correct permissions.

Use the Time Machine System Preferences to set your backup disk to your MBWE.

GeekTool

I’ve been playing around with GeekTool for a couple of days and I’ve finally gotten everything I want on my desktop.

Here’s what my desktop looks like at the moment:

My GeekTool Desktop

My GeekTool Desktop

For reference, here’s my list of GeekTool Scripts:

  • Computer Name: hostname -s
  • Login Name: whoami
  • Day: date “+%A”
  • Month: date “+%b”
  • Day (numerical): date “+%e”
  • Time: date +”%I:%M”
  • AM/PM: date +”%p”
  • Mac OS X Version: sw_vers | awk -F’:t’ ‘{print $2}’ | paste -d ‘ ‘ – - – ;
  • Disk Usage: df -H | grep disk0s2 | awk ‘{print “Disk:”, $3, “/”, $2, “-”, $4, “available”}’
  • Uptime: uptime | awk ‘{print “Up: ” $3 ” days”}’
  • Airport Network Name: airport -I | grep -e “bSSID:” | awk ‘{print $2}’
  • Airport Channel: airport -I | grep -e “channel:” | awk ‘{print “Channel: ” $2}’
  • Airport Max Rate: airport -I | grep -e “maxRate:” | awk ‘{print “Max Rate: ” $2}’
  • Airport Link Authorisation: airport -I | grep -e “link auth:” | awk ‘{print “Auth: ” $3}’
  • External IP: echo `curl -s http://checkip.dyndns.org/ | sed ‘s/[a-zA-Z<>/ :]//g’`
  • Running Processes: ps -c -U pmac -o command,%cpu,%mem -r
  • Airport IP: ipconfig getifaddr en1
  • Calendar: cal
  • Network Location: scselect 2>&1 | grep ‘^ *’ | sed -e ‘s:^[^(]*(([^)]*))$:1:g’

Most of these commands were culled from various websites, while I came up with the rest myself.

Disabling Ethernet Prevents Mac OS X From Waking

Problem: When MacBook lid is closed, fan continues to spin and MacBook becomes very hot.

Description: When in use the MacBook fan behaves as expected. On closing the lid to put the MacBook sleep, the fan continues to spin and the base of the machine becomes very hot.

Opening the lid displays a black screen. No mouse or login screen displayed. Fan continues to spin at what seems to be maximum RPM. Closing the lid again does not stop the fan from spinning.

Only available option is to hold the power button to shut down the system.

On pressing the power button to restart the system, the MacBook starts, displays grey start up screen for a second or two and then restarts automatically. MacBook then starts normally.

Once the user logins, the system works as normal again. Putting the system to sleep, causes the problem to reoccur.

Solution: The user deactivated the Ethernet interface within System Preferences -> Network. Reactivating the Ethernet interface and restarting the machine resolved the problem.

(Who’d have thought that disabling the Ethernet interface would prevent the system from sleeping? Certainly not me when I decided to do so.)

Enabling Remote Desktop Connection in Vista Home Premium

I had reason recently to try a Remote Desktop Connection with a PC running Vista Home Premium. While Vista HP allows you to send Remote Invitations, it doesn’t allow Remote Connections to be initiated from the client computer.

I played around with using VNC, but the connection was much more flakey and slower than a RDC session would be. It was with some relief that I found this post from “Fran Goes Blog” with a solution. It worked a treat. Thanks Fran.

The Quick Way to Connect to a Network Drive using Mac OS 10.5 Leopard

I’ve posted a few times about the problems I’ve had connecting to a network drive using Leopard. Previously I posted about how Leopard was able to connect to a network drive, but wouldn’t show the contents of the shared folder. After a lot of testing, and a bit of luck, I followed that up with a post on how I was able to browse the folders on my network drive. Now, I’ve found a way to connect to my network drive and browse the folders almost immediately. Although this method may sound a bit convoluted, there are just four steps. As I only have my MacBook to test with, I can’t guarantee that this will work for you, but I don’t see any reason why it shouldn’t.

Step One

Connect to your network drive in the usual manner. Either use the Command-K shortcut, or from the Menu Bar use Go -> Connect to Server. In either case, you’ll be presented with a Connect to Server dialog box. The server address should be specified as:

smb://network.drive.ip.address

Click the Connect button and wait for Finder to connect to your network drive. If you have more than one shared folder set up on the drive you’ll be prompted for the folder that you want to connect to. Once Leopard has connected to the shared folder a new Finder window should open.

Step Two

Open Terminal from Applications -> Utilities -> Terminal. At the prompt, type the following command:

sudo smbclient -L NETWORK_DRIVE_NAME

The NETWORK_DRIVE_NAME refers to the the Windows name for your drive and is usually set using the configuration interface for the drive – this may be a web interface or an application, the exact details will depend on your specific drive. When you press Return, you’ll be prompted for your password. Type your password and press Return again. When you run this command, you should get a response like this:

Receiving SMB: Server stopped respondingsession request to NETWORK_DRIVE_NAME failed (Call returned zero bytes (EOF))Receiving SMB: Server stopped respondingsession request to *SMBSERVER failed (Call returned zero bytes (EOF))

Although the Samba Client returns with an error message, don’t worry, you’re still on track to be able to browse the drive contents.

Step Three

Restart the Finder. This is achieved by typing the following command in Terminal:

sudo killall Finder

Once this command has been entered, the Leopard Finder will restart. You’ll notice that your Desktop icons disappear, as will any open Finder Windows. Your Desktop icons should reappear almost immediately.

Step Four

Repeat Step Three:

sudo killall Finder

Open a Finder Window, and under the Shared section your network drive should be listed. Click the drive name, and then double-click the shared folder name. You should now be able to browse the contents of the drive.

Important Notes

  • I don’t know why, but the Finder has to be restarted twice for this work.
  • The Terminal commands must be run using sudo or as root (using su), even if you are logged in as an adminsitrator. If you are an administrator, you’ll be able to run the smbclient command and the killall command, but the process just won’t work.
  • I have no idea why this works, or how, I just know that it does work for me.
  • I’d recommend that you close all open programs while doing this, just in case. Using the killall command may have some strange effects on open programs, or lead to system instability.
  • Once again, I haven’t been able to test this on any other system other than my own, so your milage may vary.

WaterRoof – GUI Frontend for the Mac OS Firewall

Any time I reinstall Windows on my desktop machine, there are 2 programs that go on before anything else: anti-virus and a personal firewall. However, on my MacBook, I have no anti-virus installed, and the firewall comes pre-installed.

Following the initial release of Leopard, there were some concerns regarding the efficiency of the firewall. The configuration utility provided with Leopard, or for that matter, Tiger, is not great for power users. You can use the command line to view and edit the firewall rules, but it’s not the most intuitive way to do it. Enter WaterRoof. Available for both Tiger and Leopard, this handy tool allows you to apply either pre-built rule-sets or to create your own.

As well as allowing editing of rules, WaterRoof also provides access to the firewall logs, either graphically or the raw statistics. If you’re new to Mac OS and want more control over the inbuilt firewall, the WaterRoof is worth having.

Forcing Time Machine to Use a Network Drive


Update 18 December 2007:

I’ve discovered a better way to force Finder to browse the contents of a network drive. You can read more here.


By default, Time Machine will not allow you to back up to a network drive – even if you can get Leopard to recognise the drive.

However, there is a command that will allow you to use a network drive with Time Machine. Before running this command, mount your network drive. Open Terminal, and at the prompt type:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Open Time Machine Preferences, and you should now be able to view your network drive mounts.

My Network Drive Now Works with Mac OS X Leopard

Update 18th December 2007


I’ve found an easier way to force Finer to recognise the contents of a network drive. You can read more about it here.


I’ve written at some length about the problems that I’ve been having getting Leopard to connect to my Network Drive via SMB. The problem has been grating on my nerves over the last few days, and I’ve spent an inordinate amount of time trying to get it to work.

I’ve tried quite a few things over the last few days to try to get it to work, all without success. Here’s just a sample:

Reinstalled Leopard from scratch

I erased my entire hard-drive and installed Leopard from scratch. I did this just in case there was a problem with the installers method of upgrading from Tiger to Leopard. In the end, I had the same problem: Leopard could see my network drive, but not the contents.

Installed Tiger, updated Tiger, then installed Leopard

Installed Tiger from scratch, once again erasing the hard-drive in the process. Updated Tiger using the Software Upgrade option from the Apple menu. Then upgraded to Leopard. I went through this rigmarole just in case there were parts of Tiger that were being carried over into Leopard and that weren’t being upgraded. Still no joy though.

Manually reverted to the old version of the smb.conf file

I located the smb.conf file in the /etc directory, renamed it smb.conf.new, then proceeded to rename smb.conf.old to smb.conf. Restarted the computer. I did this just in case it was a configuration issue. No luck with this either.

Installed the latest version of Samba

I downloaded and installed the latest version of Samba from the web. In case there was an issue with the version shipping with Leopard, I thouht it might be a good idea to try this, but I still wasn’t able to get it to work. In fact I wasn’t even able to get Samba installed. It may work, but I just didn’t see it going anywhere.

Installed Sharity 3

Sharity is a program that brings the SMBFS file system to Unix. There’s a version available for Mac OS X, but while it looked promising, it just ended up hanging the OS.

Reformatted my network drive with the Mac OS Extended File System

Thinking that it may be a problem with the way that Mac OS views FAT file systems, I tried formatting the drive for use with Mac OS. I had no problem partitioning and formatting the drive when it was directly connected to my MacBook, but when I tried to connect to the drives built-in webserver it reported that there was no free space – the firmware in the drive just didn’t recognise the file system. So I had to reformat it back to FAT32 again.

Now that I’ve been through what didn’t work for me, I can explain what I did to get Leopard to recognise my network hard drive.

  • Connect to my Network Drive using Apple-K
  • Close the lid of my MacBook
  • Leave it sleep for several hours
  • Open the lid of my MacBook and login back in

Voilà! I can now browse my network drive, and add and delete files and folders, etc. I’ve moved my iTunes Music folder to the drive and it works perfectly.

There is one issue. The network drive does not appear under the Shared section of finder, nor under the Desktop folder in my profile, even though I can see the link to the folder on my Desktop.

More on Connecting to a Network Drive Using Mac OS 10.5 Leopard


Update 18 December 2007:

I’ve discovered a better way to force Finder to browse the contents of a network drive. You can read more here.


I wrote recently about the problems that I was having connecting to a network drive from my MacBook.

I still haven’t solved the problem, but I have come across something else: If I share a drive on my Windows XP computer, the computer will be displayed in the Finder Window, along with my network drive. I can browse the Windows machine, but for some reason, I still can’t browse the network drive.

Finder Window

Problem Connecting to a Network Drive using SMB on Mac OS 10.5 Leopard


Update 18 December 2007:

I’ve discovered a better way to force Finder to browse the contents of a network drive. You can read more here.


Today I bought a new network hard drive. I bought it because I was getting tired of dragging my old USB external drive from room to room when I needed it. Having a network accessible hard drive makes it so much easier to share data between multiple computers using multiple operating systems.

Initially I set it up from my Windows machine, as I was working on that at the time. Setup was easy enough, and within a minute I was backing up my data over the network.

My problems started when I tried to access the hard drive from my Intel MacBook running Mac OS 10.5. I could connect to the drive and the shares with no problem, but when I tried to browse the contents of the share, it appeared to be empty. Now, I know it’s not empty because I just copied data onto the drive from my Windows machine. First of all I though that it may be the Mac OS firewall that was causing the problem, but even after disabling it, I still couldn’t get Finder to see any of the files on the drive.

I tried creating a folder on the drive using Finder. It seemed to create the folder OK, but no sooner had it done so than the folder disappeared. I checked the drive using Windows XP and the folder was there. It just wasn’t visible to Leopard.

The drive that I bought has a built in FTP server, so I tried to browse the drive using my FTP program and it worked. Using Finder to connect via FTP also worked. In both instances I was able to browse OK, but I could only add new files and folders with my FTP program.

I also tried mount the drive from the command line using:

mount_smbfs //user:password@drive_name/share_name /Volumes/NAS

(BTW, I had to manually create the /Volumes/NAS directory first)

No error messages were returned by the command and the hard drive showed as being connected in Finder, but once again, the share contents were “missing”. I also tried connecting using the CIFS protocol, but the same problem occurred. In desperation, I even tried using the Apple AFP protocol, even though I had an inkling that the drive wouldn’t support it. Unfortunately I was right.

I’ve been browsing the web for a bit looking for a solution, and it looks like I’m far from being the only person with this problem. There’s a thread on the Apple forums with some possible solutions, but none have worked for me.

So for the time being it looks like I’m stuck with browsing my new hard drive via FTP from my MacBook, while my Windows machines will have no problem connecting.