Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

WINS workgroup resets every time I startup my MAC

Hi,

I m a new mac user.

I noticed that every time i switch off then on my mini, the remote pc s on my network can t access my smb shares.


After investigating i foud out that in fact at each startup, the WINS workgroup name i've set manually to "WORKGROUP" the time before. resets.


And according to the kdc.log file, here s the reason :

NTLM domain not configured

Anyway the /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist is correct and the WORKGROUP appears right.


In fact, what happens, is that smb is launching too soon in the startup sequence (is that because my SSD causes my mac to boot up in less than 15 sec ?), and the network is not initiated when samba starts.


as a result, disabling/enabling file sharing makes my mac shares instantly available on all my PCs

also, typing the following command :

sudo touch "/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist does the trick to.


But i'm fed up with doig that on every startup.

so I found the following script on the web, which should reset samba 60 seconds after startup.


<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.me.restart_smb</string>
<key>ProgramArguments</key>
<array> <string>/bin/bash</string>
<string>-c</string>
<string>sleep 60;touch "/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist"</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>


I ve put the plist in /library/LaunchDaemons

but it's not working.


I'd like some help to automate the

touch "/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist"


command at startup.

I tried compiling an app with that command in applescripteditor, but as it requests the "with admin privileges" tag, it prompts an asks for my password.


As I said, I only had a mac for 2 weeks now so I can not go further by my own.

Any help would be appreciated.


Thanks a lot.

Mac mini, OS X Mountain Lion (10.8.2), Late 2012, quad core, 1TB + OCZ SSD

Posted on Nov 16, 2012 5:26 AM

Reply
46 replies

Nov 16, 2012 9:11 AM in response to MrTweety

Ok i'll reply to myself, maybe it will help other people, the mistake i made is that i was the owner of the .plist, so i just had to change owner to root, and that's perfect.


I reduced the time lapse to 15 seconds and now after each restart, I have to Wait 15 sec for my Hostname and workgroup to revert back to what i've set in first place. an then instantly, all my shares work.


Hope that'll help, an hope that Apple will fix this soon.

Feb 11, 2013 11:15 AM in response to MrTweety

MrTweety, you are my hero!!!

Hours of search the web are over...


I put your script modified with sleep 15 with following steps:

1. Open Finder - GoTo Folder - /library/LaunchDaemons

2. Copy com.me.restart_smb.plist to /library/LaunchDaemons

3. Open Terminal

4. cd /library/LaunchDaemons

5. sudo chown root:wheel com.me.restart_smb.plist

6. sudo chmod 644 com.me.restart_smb.plist

7. Close Terminal and restart Mac


That's it!!! Now after restarting SMB shares are working fine!


Regards Michael

Mar 17, 2013 11:11 AM in response to iDeviceDreamer

I am running 10.7.5 with all of the current patches and if you're experiencing this issue, do what this page says. I have had no issues since I set this script up. I am concerned that Apple hasn't seen to address this as part of a 10.7.x patch but this work around is awesome.


Hey Apple... please post here when you all decide to issue a repair for this behavior.


Thanks Michael and Mr. Tweety! You guys kick butt.

Mar 23, 2013 7:15 AM in response to MrTweety

MrTweety THANK YOU!


This had me absolutely scrambled after installing my SSD last week!

There seems to be many timing issues with how things are loaded on startup.

I also had to use this method for making my magic trackpad work again, instead of waiting 5 minutes for bluetooth to reconnect.

So for those who are having bluetooth startup issues, use exact same approach though in the plist replace:


touch "/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist"


with:


launchctl load "/System/Library/LaunchDaemons/com.apple.IOBluetoothUSBDFU.plist"


This can also be done with any of the system launchdaemons if the ssd is too fast!


Thanks again MrTweety!

Apr 14, 2013 9:22 AM in response to MrTweety

Tx for sharing this Mr. Tweety. I am using a SSD on my old MacPro. Unfortunately it will not upgrade to Mountain Lion, so I would love to get this working the way you describe it. I am just not a very sophisticated guy on this, so I do not understand in detail what you are doing.


Are you using the Apple Script Editor to do this? Or is it just a PHP-File? Could you please explain what file name you save it with, where you save it and if you use it in the Start-Objects? I am totally puzzled and am very grateful for any help here. Maybe you can just list the corrected script again also. Sorry for this bother but I am having the same trouble with the sharing and I would love to solve it without installing Samba 3 (cause I got no Unix knowledge).


Regards, Peter

WINS workgroup resets every time I startup my MAC

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.