1 2 3 Previous Next 40 Replies Latest reply: Feb 6, 2014 2:23 AM by Baphi Branched to a new discussion.
MrTweety Level 1 Level 1 (0 points)

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
  • 1. Re: WINS workgroup resets every time I startup my MAC
    MrTweety Level 1 Level 1 (0 points)

    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.

  • 2. Re: WINS workgroup resets every time I startup my MAC
    iDeviceDreamer Level 1 Level 1 (0 points)

    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

  • 3. Re: WINS workgroup resets every time I startup my MAC
    Skeetinator Level 1 Level 1 (0 points)

    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.

  • 4. Re: WINS workgroup resets every time I startup my MAC
    Eric Root Level 6 Level 6 (16,200 points)

    Apple doesn't read these discussions.

     

    Send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.


    Feedback

  • 5. Re: WINS workgroup resets every time I startup my MAC
    ArctiX-Arts Level 1 Level 1 (0 points)

    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!

  • 6. Re: WINS workgroup resets every time I startup my MAC
    Sidney Bristow Level 1 Level 1 (70 points)

    Guys,

     

    I hope you don't mind, I really don't know how to make a script.  Do you mind sharing it to me?  Pls email it at mark143@gmail.com

     

    I would really appreciate this.  I have been pulling my hair trying to figure this out

  • 7. Re: WINS workgroup resets every time I startup my MAC
    ArctiX-Arts Level 1 Level 1 (0 points)

    I've just sent you an email with the script attached.

    Let me know how you go :)

  • 8. Re: WINS workgroup resets every time I startup my MAC
    Barney-15E Level 8 Level 8 (35,280 points)

    This bug existed a long time ago. I thought it had been fixed, but maybe it has resurfaced and is not the same thing.

     

    In the past, if you duplicated the Automatic Loction in Network preferences, then deleted the original (rename the new location as you see fit), it would keep the WINS settings through restart.

  • 9. Re: WINS workgroup resets every time I startup my MAC
    alehof Level 1 Level 1 (0 points)

    Hello Mac friends,

    many thanks for the workaround.

    It works fine and I'm absolutely happy with this

     

     

    Greetings,

    alehof

  • 10. Re: WINS workgroup resets every time I startup my MAC
    PeterPeety Level 1 Level 1 (0 points)

    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

  • 11. Re: WINS workgroup resets every time I startup my MAC
    Jabbanz Level 1 Level 1 (0 points)

    Hi,

        Could some please email me the script as I also not sure how to do this.

    Jabbanz@icloud.com

    Cheers

    Jared

  • 12. Re: WINS workgroup resets every time I startup my MAC
    raily74 Level 1 Level 1 (0 points)

    Hi MrTweety,

     

    i don't know how many hours i've spend to get this working for me. My Konica Minolta bizhub C25 should send scans via smb and Mac OS causes same error.

    Could anyone of you please email this script to me? This would be great! e-micha@gmx.de

     

    Thank you very much!

     

    Regards, Michael

  • 13. Re: WINS workgroup resets every time I startup my MAC
    raily74 Level 1 Level 1 (0 points)

    Thanks! It's all done. I've coppied the text into SK Edit and saved it as a plist.

     

    Now it works!!!

  • 14. Re: WINS workgroup resets every time I startup my MAC
    Anthony W. Level 1 Level 1 (15 points)

    I would also like to add that this fix, does in fact work for Mountain Lion 10.8.4. I was hoping to see this resolved with the .4 but sadly it is not.

    Applied the said fix and it works GREAT!! Thanks for the find and also for sharing with the world! 

1 2 3 Previous Next