Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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).

share|improve this question
    
Have you considered trying to repair your installation? I think the dvds of either retail or packaged can do it. –  tobylane Mar 24 '11 at 16:05
    
@tobylane, that is what I might need to do eventually but I am very bussy and I don't want to mess my current installation up. I belive the problem is that I had several different iOS SDKs and I removed some manually and some dependency got messed up. I see lots of these in log: "Unknown class "'AppleSharing_NatManager' using 'NSObject' instead". –  Ali Mar 24 '11 at 16:37
    
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 0:46
    
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:10

2 Answers 2

up vote 2 down vote accepted

Thanks to @Austin (http://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!

share|improve this answer

If you think you left it configured correctly the last time you used it, you can probably just start it up with:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.InternetSharing.plist

You can edit the settings by hand in /Library/Preferences/SystemConfiguration/com.apple.nat.plist

share|improve this answer
    
thanks a lot, it might be the only thing that I need, unfortunately my Internet sharing was disabled and there is no com.apple.nat.plist file in my Systemconfiguration directory. Could you please share your (or a sample) com.apple.nat.plist content? –  Ali Mar 25 '11 at 5:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.