0

for some rather strange reason my sharing preferences tab crashes (it's a long story and there seems to be no good solution for it, it's looking for a ui object that no longer exists).

Anyway, I want to enable internet sharing to share my macbook's internet connection with my iPad but I can't find a way to do it without the gui or apple script (which basically calls the gui).

Ali
  • 255
  • 4
  • 13
  • In case you are wondering when I click on shring in the preferences tab it crashes and in console I get an error like "unknown Class 'AppleSharing_NatManager' using 'NSObject' instead" – Ali Mar 24 '11 at 23:07
  • so far I am thinking I need to 1- enable routing 2- run natd 3- make sure firewall is properly configured 4- make a peer to peer wireless network on wifi – Ali Mar 25 '11 at 00:46
  • another option is to use `sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.InternetSharing.plist ` the problem is I need at least a valid Snow Leopard .plist file for this to work. – Ali Mar 25 '11 at 11:55
  • Another solution I tried is to use a virtual machine (I use an Ubuntu VM in Parallels) to do the connection sharing. It works but it's too much work. – Ali Mar 26 '11 at 13:11

1 Answers1

0

Thanks to @Austin (https://apple.stackexchange.com/users/5916/austin) and others, I finally solved the problem! I thought damn it, this is a Unix box, i should be able to find out what's going on! I found another Snow Leopard machine at work which never had Internet Sharing turned on and in a terminal I ran:
touch now && sudo find -x / -newer now

and I got a short list of files that always show up (spotlight indexes, log files in /private/log and if you are using file vault a bunch of encrypted sparse bundles ...)

then I enabled Internet sharing and this time I ran: sudo find -x / -newer now obviously without the "touch now". It turns out that other than a bunch of log files and other junk there are a hand full of files that are modified. I copied them all over to my machine and modified the interface names and few other hostname and ip addresses and stuff like that. The problem happend with /Library/Preferences/SystemConfiguration/com.apple.nat.plist there is a primary service key there which is set to a UUID and it is different on every machine that I tested (2 machines actually) and it does not work from if you just copy it from one machin to next.

* IF YOU ARE IN A HURRY JUST READ THIS PART * From the start I avoided reinstalling my OS because I had so many Installations and configurations that I didn't want to loose. It turned out that if you use the original DVD that comes with your machine and reinstall your OS ALL YOUR APPLICATIONS, HOME DIRECTORY, custom modifications, mac ports and fink installations, preferences, network mounts, network locations, developer tools, ALL ARE PRESERVED. BUT IT REINSTALLS THE CORE SYSTEM COMPONENTS that fiex my preferences sharing pane!

PROBLEM SOLVED!

Ali
  • 255
  • 4
  • 13