Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Not a hint, but a funny networking Easter egg Network
Not really a hint but I thought this was hilarious.

I did a Get Info on one of the PC Servers connected to my Mac when I noticed the contents of the icon on the preview area. Yes, it is a picture of the Blue Screen of Death. All the connected PC servers get this icon. Cannot tell what version of Windows BSOD this is though.
  • Open a Finder window.
  • Right click on a server (under 'Shared' in the Sidebar).
  • Select Get Info.
I love the extra attention Apple gives to details in OS X.

[crarko adds: Another reader (titaniumtroop) set in a similar submission about the Quick Look icon for a Windows Server being the BSOD. Apple has removed so many of the good old Easter eggs it's nice to see an indication that a sense of humor still thrives in Cupertino.]
  Post a comment  •  Comments (19)  
  • Currently 2.87 / 5
  You rated: 4 / 5 (15 votes cast)
[8,130 views]  View Printable Version
10.6: Slow SMB browsing of Windows Servers fixed Network
Snow Leopard only hintBy default in Mac OS X browsing to Windows 2008 and 2003 Servers is extremely slow, navigating from one directory level to the next can take a minute or longer. I utilize my Mac to access the office Windows 2008 and 2003 file servers and the speed to access these shares makes it almost impossible to work from a Mac.

To make things even worse I do most of my work through a Cisco SSL VPN loaded on my Mac from home over a broadband connection. Out of pure frustration I started playing with settings in my SMB configuration and have found a way in Mac OS 10.6.7 to speed the process up drastically to where navigating folders is almost instantaneous (including over my VPN). This makes the Mac work just as fast as my Windows 7 workstation when connecting to Windows servers.

In order to fix the slow SMB browsing you will need to edit the smb.conf file on your Mac. The file is only editable by the user root so you'll need to use a text editor that can authenticate (like BBEdit or TextWrangler) or do this in the Terminal. I did the latter. I had root enabled and used the 'su' command, but you can just use 'sudo' with your administrator account to accomplish the same thing.

Once the file has been edited and saved you will need to restart your mac for the changes to take effect. Mac OS X being Unix at the core utilizes the Samba daemon to access Windows networks and the smb.conf file controls how Samba accesses these Windows shares. 2br
  • Launch the Terminal (Applications/Utilities/Terminal).
  • You can use the vi or the pico editors included with Mac OS X to edit the smb.conf file by typing sudo vi /etc/smb.conf or sudo pico /etc/smb.conf.
  • You will be prompted for a password, utilize the password for your admin account.
  • I used vi. In order to change anything within the file you will need to put vi into insert mode by typing the letter i (at the bottom you will see the word insert).
    Some handy vi editor tips: vi has 2 modes: 'Command Mode' and 'Insert Mode.' To switch between modes you use the letter i in Command Mode to switch to Insert Mode and when in Insert Mode you use the Escape key to switch to Command Mode. File saves are done in Command Mode and edits to the file are done in Insert Mode. You can search the file you are editing in Command Mode by typing /searchstring where searchtring is what you are looking for in the file.
  • Scroll down to the line use spnego = yes and change the yes to a no.
  • Continue to scroll down to stream support = yes and change this to no, on the line immediately below that says ea support = yes change this to no.
  • In the next group that says darwin_streams:brlm = yes change this to no.
  • Save the file by first taking vi out of insert mode by pressing the Escape key. Then to save the file and quit vi type :wq and press Return.
  • Restart your Mac.
This simple fix for slow SMB browsing decreased the time to open shares and files on my Windows 2008 server from my Mac drastically.

[crarko adds: I haven't tested this one. I'd suggest making a backup copy of smb.conf before trying these edits, in case you need to revert. If you use TextWrangler or BBEdit, the file you're looking to change is /private/etc/smb.conf.]
  Post a comment  •  Comments (16)  
  • Currently 2.88 / 5
  You rated: 5 / 5 (8 votes cast)
[83,049 views]  View Printable Version
Several networked and non-networked options for Time Machine backups Network
This hint collects together what I have learned about solutions for Time Machine backups. There are a number of viable solutions, and I cover several of them.

External USB or Firewire drive

The most basic solution is a directly-attached external USB drive enclosure. This might be okay for desktop machines, but what bothers me about this is that both the Mac and the drive are on the same power circuit. If lighting strikes, then both can get hit at the same time. In a Mac Pro, you can use another internal drive for TM. And there are also external RAID solutions like I mention below. Unless you are particularly disciplined, this is a lousy solution for portable Macs. When I was going this route, I was lucky if I remembered to plug in the backup drive once a week. Maybe other people can do better than that, but it's still inconvenient.

Thus, I prefer networked solutions. However, at the end of this hint, I go into a discussion on why TM is a great design for local backups, but a major source of unreliability for networked backups.

Time Capsule

If you want to do Time Machine backups over a network, then Apple's primary supported configuration is Time Capsule. I'm not happy about that, because Time Capsules have a history of being unreliable. Back in 2009, there was a wave of failures. A web site was set up to track the failures. This site is either abandoned, or there haven't been any failures since early 2010. Maybe TC has gotten better, but the fact of the matter is, it's a single-disk system with inadequate ventilation and cooling. People still report them getting very hot. Mechanical drives are already a ticking time bomb -- letting them get hot accelerates that process significantly. The heat also plays havoc with the other electronics, and many failures have left the drive intact but inaccessible. You could get a replacement unit from Apple, but you could not salvage your data, because removing the drive would void your warranty.

Apple server

Once upon a time, Apple sold a blade server called Xserve. That may have been part of a reasonable TM solution for a corporate environment. But with the demise of any sort of dedicated Apple server platform, there is no longer a good centralizable solution for TM backups for a large number of Macs. In a corporate environment, therefore, you must decide if you want to provide every desktop with its own external backup drive and badger the notebook users to plug it in periodically. Or set up a Mac Pro with some huge drives crammed in it and hope it works reliably as a server. For a home user, if you have a desktop Mac and a notebook, you can connect an external drive to the desktop and backup the notebook wirelessly. You just have to make sure that the desktop is awake whenever you want to backup the notebook, which is only slightly more convenient than just plugging the notebook into its own backup drive.

The most convenient solution is some kind of Network Attached Storage (NAS). Unfortunately, Apple's support for that is limited to their own sanctioned solutions.

Airport Extreme Base Station with external USB drive

Another option is a USB drive attached to an Airport Extreme Base Station (AEBS). This isn't officially supported by Apple, although the firmware supports all the necessary Apple Filing Protocol (AFP) features for Time Machine to work reliably. There, the weak link is the drive itself. There are a lot of external USB drive options, like WD's MyBook, but most of those solutions aren't intended for extended use. If you back up three Macs to one drive, then that drive is going to spin up three times an hour, and spin-ups cause wear and tear to desktop drives. On the other hand, if the drive spins continuously, unless the external enclosure has a fan in it, then it's going to heat up, with the usual consequences.

I would recommend a RAID solution like the LaCie 2big Quadra. (There's a switch on the back to select a RAID 1 configuration.) This actually costs more than a TC of the same capacity, but that's because there are two drives, providing redundancy. If a drive fails, open up the unit and replace it. If the logic board fails, pop the drives in a replacement enclosure. You can connect a drive to the AEBS via USB, and it appears as a Time Machine supporting volume with no hassle. If you're willing to spend the money, I think this may be the best solution overall.

Linux or Windows Server

With Linux, you have a few options for serving files, including NFS, SMB, and AFP. For Windows, you have built-in SMB support, and there are NFS solutions as well.

The most obvious solution for Linux would be to use an AFP server, like Netatalk. AFP is more efficient than SMB and therefore faster over high speed networks. Unfortunately, Netatalk has some serious drawbacks:
  • It suffers from random authentication failures. Every Mac I have will randomly fail to authenticate once out of every 5 or 10 connection attempts, and I'm not the only one with this experience. My attempts to debug have failed because doing things like enabling debug messages mask the problem. I've reported this bug, but I was told by the Netatalk devs that they're only interested in looking into it if a corporate customer encounters the problem. The occasional failed authenication, however is really a minor problem. Netatalk can supposedly use Kerberos authentication directly, but I've never been able to get that to work.
  • Netatalk doesn't support Replay Cache or TM Lock Stealing, two features essential for reliable TM backup over a network.
  • As a result of the missing Replay Cache feature, if you attempt to put a Mac to sleep during a backup, it will LOCK UP HARD. This is obviously a bug in MacOS, but it nevertheless eliminates Netatalk as a viable solution for Time Machine.
I've experimented with trying to use NFS for TM backups, but I couldn't get it to work. For one thing, even if you advertize the share using Zeroconf/Bonjour, MacOS won't see it. It worked with Tiger, but it's been broken ever since, so I think this is intentional.

If you manually mount the NFS share, TM will see it (if you have unsupported volumes enabled) at the time you have it mounted and let you select it for backup, but it is unable automatically mount it later when it's time to do a regularly scheduled backup. (Just 'Making backup disk available...' indefinitely.) If you're on a desktop Mac, you can use automount for NFS, but this isn't a solution for portables. MacOS's support for SMB is buggy and slow, but it's easy to setup and seems to be the only viable alternative to AFP. Therefore, the rest of this hint covers using a SMB server (Linux or Windows) to store Time Machine backups.
read more (1,171 words)   Post a comment  •  Comments (39)  
  • Currently 3.17 / 5
  You rated: 3 / 5 (12 votes cast)
[15,221 views]  View Printable Version
Keep attempting reconnection to wireless network Network
Having trouble automatically reconnecting your unattended Mac to a wireless network because of unreliable signal quality? If you would like to have it keep reattempting reconnection until it manages to connect it's fairly simple to setup.

You need to use the airport command line tool in the Terminal. Open a terminal and run the following command (with no line breaks), typing in your password when prompted:
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport prefs joinmode=automatic joinmodefallback=keeplooking
Unlike the JoinModeFallback setting of 'prompt' (which can be set in System Preferences) or 'donothing,' if it fails to join a network it will wait about a minute and then scan for a network to join again. It will do this until it succeeds. Very useful for an unattended Mac acting as a server, especially if you're not in the same location as it.

Note that this may have a negative affect on your battery life if running on a laptop.

[crarko adds: I haven't tested this one. I didn't have any unreliable wireless connection handy so I don't need the repeated attempts to join.

Here are the other options for the listed preference settings:

JoinMode (String)
  • Automatic
  • Preferred
  • Ranked
  • Recent
  • Strongest

JoinModeFallback (String)
  • Prompt
  • JoinOpen
  • KeepLooking
  • DoNothing
I believe JoinMode = Ranked and JoinModeFallback = Prompt are the defaults, if you want to switch back. If you type in the above command with just prefs and no other parameters it will tell you what the curent settings are. You might want to record those before making any changes.]
  Post a comment  •  Comments (4)  
  • Currently 3.67 / 5
  You rated: 5 / 5 (6 votes cast)
[6,442 views]  View Printable Version
Simulate Airport Express network audio Network
Have you ever wanted to wirelessly stream all audio from your Mac to the Unix/Windows/Mac box in your cupboard connected to your beefy stereo? Here is an alternative to buying an Airport Express for the purpose.

This tip is similar to this hint but after experimenting with that technique and various other options I think I've hit on an improved setup.

read more (598 words)   Post a comment  •  Comments (12)  
  • Currently 4.00 / 5
  You rated: 1 / 5 (7 votes cast)
[19,007 views]  View Printable Version
Stop Finder from rounding file sizes on Samba shares Network
If you have a Linux or BSD machine running Samba you may notice that its exported shares round up all files under a megabyte (i.e. 720kB becomes 1MB) by Finder.

To fix this problem add the following line to the server's smb.conf:

allocation roundup size = 0

Restart the Samba daemon, reconnect to the share, and files under one megabyte should now be calculated correctly in Finder.

[crarko adds: I haven't tested this one. I would assume (but don't know) that this change may also be needed to the Samba server on a Mac.

On most systems this file is located at /etc/samba/smb.conf or /usr/local/samba/lib/smb.conf. In Snow Leopard the location is /etc/smb.conf. You may want to save off a backup copy of the file prior to editing it. To save it you need an editor that can authenticate as root, such as TextWrangler or BBedit or you can use a command line editor invoked with sudo.]
  Post a comment  •  Comments (6)  
  • Currently 3.33 / 5
  You rated: 4 / 5 (6 votes cast)
[4,927 views]  View Printable Version
Encrypted TimeMachine Network Backup Network
As the default setting, Time Machine does unencrypted backups. This hint changes that and works for both AFP and SMB shares.

As I backup my machine on a volume anyone in my network can access, I searched a way to store an encrypted backup. Unfortunately, if the target image for Time Machine simply is replaced by an encryptet image, the OS does not promt for entering a password and aborts.

In short, the trick is to copy a stored password from the user's Keychain to the System Keychain.

You need: A working Time Machine either normal or via the unsupported volumes method found for example in this forum. [crarko adds: I'm not sure if this is referring to this previous hint.]
read more (326 words)   Post a comment  •  Comments (1)  
  • Currently 4.20 / 5
  You rated: 2 / 5 (5 votes cast)
[12,011 views]  View Printable Version
Copy public IP address to clipboard via keyboard shortcut Network
A friend asked me for a way to put his current public IP address (which changes regularly, it seems) on the clipboard via a keyboard shortcut, and to alert him as to what value was copied. Using a combination of a shell script, Butler, and Growl (specifically, the shell command growlnotify), I was able to put together a solution for him. Note that Butler (disclaimer: I'm part of Many Tricks, Butler's developers) can be replaced by any program that lets you execute shell scripts via a hot key. You could also put the shell script in Automator, and go that route ... but I digress.

Here's the script:
MYIP=`curl -s '' | sed 's/.*Current IP Address: \([0-9\.\.]*\).*/\1/g'`
echo $MYIP | pbcopy
/usr/local/bin/growlnotify 'IP address copied' -m "Address was: $MYIP"
I made this executable and saved it as copyip. The MYIP line was culled from some combination of old hints and comments here; I wasn't able to figure out exactly where I pulled it from, though. It basically uses curl to grab the "What's my IP address?" page from, then uses sed to process out the actual IP number. The second line puts the IP address onto the clipboard, courtesy of pbcopy. Finally, the last line calls growlnotify to display an onscreen notification; the full path was used as I found it required for the next bit).

The last step was to assign this script to a hot key. To do that, I used Butler's ability to run AppleScript code. From the plus-sign icon at the bottom of the Butler window, I chose Smart Item » AppleScript » AppleScript. In the Source Code section of the new Smart Item, I put this:
do shell script /path/to/copyip
In the Triggers tab, I assigned a keyboard shortcut, and I was done. My friend can now have his public IP placed on the clipboard with a simple keyboard shortcut, and get a visual confirmation that it was done correctly. Note that there's no error handling of any sort in my script; if it fails, it's going to fail ugly. You have been warned.

[crarko adds: I haven't tested this one.]
  Post a comment  •  Comments (3)  
  • Currently 3.67 / 5
  You rated: 1 / 5 (6 votes cast)
[7,385 views]  View Printable Version
Stop constant wireless usage Network
After searching long and hard, (and finding people with the similar problems) I finally found the solution to my constant wireless network usage (0.3KB/s down, 0.1KB/s up), even when I wasn't accessing the network -- turning off the AirPort menu bar icon stops the traffic.
read more (321 words)   Post a comment  •  Comments (5)  
  • Currently 2.58 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (12 votes cast)
[23,292 views]  View Printable Version
Another way to create a screen sharing shortcut Network
Recently, I read a hint about how to use Automator to execute a shell script to open a screen sharing session to another machine. It turns out that there is a much simpler (and faster) way to accomplish this.
  • Open a screen sharing session to the desired host.
  • Notice the small icon in the middle of the title bar of the screen sharing session.
  • Click on the icon and drag a copy to your desktop.
  • Close the screen sharing session.
  • Click on the icon you dragged to the desktop. It should open a connection to the desired host.
  • You can rename the icon or add graphics to the icon as desired.
Note that this method opens the session much more quickly than the Automator shell script method.

[crarko adds: I tested this, and it works as described. This is an addition to this hint which talks about finding the .vncloc files in ~/Library/Application Support/Screen Sharing. Today's hint creates an alias to the corresponding file there.

This previous hint shows how to make a .inetloc file for vnc in Safari which accomplishes the same thing. There are a lot of different ways to make shortcuts fot screen sharing, and this is another addition to that list.]
  Post a comment  •  Comments (7)  
  • Currently 4.86 / 5
  You rated: 5 / 5 (7 votes cast)
[15,153 views]  View Printable Version