MrTweety

Q: 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

Close

Q: WINS workgroup resets every time I startup my MAC

  • All replies
  • Helpful answers

first Previous Page 3 of 3
  • by dathan42,

    dathan42 dathan42 Sep 12, 2013 8:42 PM in response to Sidney Bristow
    Level 1 (0 points)
    Sep 12, 2013 8:42 PM in response to Sidney Bristow

    Sidney,

    This is not fixed in the latest build 10.8.5.

     

    However, in the next OSX Mavericks release, Apple is switching to SMB2 networking. I am therefore hopeful that this isssue will be  addressed as part of this big re-work of OSX's networking capabailities...but without any specific detail I can't confirm this for certain.

  • by BBrook1,

    BBrook1 BBrook1 Oct 2, 2013 6:03 PM in response to MrTweety
    Level 1 (0 points)
    Oct 2, 2013 6:03 PM in response to MrTweety

    I'd like to receive this script by email as well (bikesnbooks@yahoo.ca).  I've tried a host of solutions with no avail.  I've contacted Apple twice by phone and both times they hung up on me - I'm not impressed.  The problem connecting to Lion Server 10.7.5 from my two Win7 machines cropped up in the last week or so. 

     

    Thanks much,

  • by GaryKing,

    GaryKing GaryKing Oct 22, 2013 7:34 PM in response to dathan42
    Level 1 (10 points)
    Oct 22, 2013 7:34 PM in response to dathan42

    Now that OS X Mavericks is out today, is anyone able to confirm or deny that the problem is fixed in Mavericks, so that this script is no longer necessary? I'm talking about need to manually restart the WINS Workgroup when starting up a Mac, particularly one with an SSD.

  • by Sidney Bristow,

    Sidney Bristow Sidney Bristow Oct 23, 2013 2:25 AM in response to MrTweety
    Level 1 (70 points)
    Oct 23, 2013 2:25 AM in response to MrTweety

    This has been address in Mavericks.  I gave a feedback few weeks ago in this forum but since mavericks has not been release yet at that time, I was scolded by apple and they deleted my feedback

  • by mylesdevon,

    mylesdevon mylesdevon Nov 1, 2013 2:59 AM in response to MrTweety
    Level 1 (0 points)
    Nov 1, 2013 2:59 AM in response to MrTweety

    I'm still on 10.8.5, so would really appreciate the script if someone could mail it to me:  mylescavis@gmail.com.

     

    The strange thing is that my MBP remembers the workgroup name fine, but my Mac Mini Server won't.  Both on 10.8.5.  Strange...

  • by dathan42,

    dathan42 dathan42 Nov 1, 2013 4:14 AM in response to mylesdevon
    Level 1 (0 points)
    Nov 1, 2013 4:14 AM in response to mylesdevon

    mylesdevon,

    I tried to email the script to you but your email address is bouncing!

     

    I note your comment that "The strange thing is that my MBP remembers the workgroup name fine, but my Mac Mini Server won't.  Both on 10.8.5."

     

    Can you confirm if your MBP uses a SATA hard drive or does it use SSD?

  • by mylesdevon,

    mylesdevon mylesdevon Nov 1, 2013 4:16 AM in response to dathan42
    Level 1 (0 points)
    Nov 1, 2013 4:16 AM in response to dathan42

    The bounce is because I was typing too fast... sigh. 

     

    If you could try mylescdavis@gmail.com, that should work.

     

    The MBP uses a SATA hard drive, the MMS uses a SSD.

     

    Thanks so much for your help!

  • by dathan42,

    dathan42 dathan42 Nov 1, 2013 5:03 AM in response to mylesdevon
    Level 1 (0 points)
    Nov 1, 2013 5:03 AM in response to mylesdevon

    Yes, this explains it 100%. This particular bug is specific to Macs which use SSD's but does not occur with Mac's with SATA drives.

     

    I have emailed the script to you again.

  • by mylesdevon,

    mylesdevon mylesdevon Nov 1, 2013 5:34 AM in response to MrTweety
    Level 1 (0 points)
    Nov 1, 2013 5:34 AM in response to MrTweety

    OK, dathan42 very kindly sent along the script.  Copied it to the LaunchDaemons folder no problem.

     

    However, when I go into Terminal and try the sudo step, I get the following error:

     

    "sudo: can't open /private/etc/sudoers: Permission denied

    sudo: no valid sudoers sources found, quitting

    server:LaunchDaemons Music$ "

     

    I saw the post in the thread about ownership of the plist - if that's the problem, I don't know how to change the ownership.  Otherwise, does anyone have any suggestions?

  • by mylesdevon,

    mylesdevon mylesdevon Nov 1, 2013 3:50 PM in response to mylesdevon
    Level 1 (0 points)
    Nov 1, 2013 3:50 PM in response to mylesdevon

    I love how these problems are all nested within each other... anyway, I found the solution to my problem, which seems to be created when (in my case) making a whole bunch of changes for enabling file sharing while trying to get a Windows/Mac network up and running, which the loss of WORKGROUP naming made only more frustrating.

     

    In case someone else finds this thread, I solved my problem here - it was the least radical of all the solutions I found, and a good number of people seem to have had the problem.

     

    https://discussions.apple.com/thread/3680870?start=15&tstart=0

     

    It's on the second page, next to the last post.

     

    Thanks to everyone here for helping me fix this, and especially dathan42!

  • by Baphi,

    Baphi Baphi Feb 6, 2014 2:23 AM in response to mylesdevon
    Level 1 (0 points)
    Feb 6, 2014 2:23 AM in response to mylesdevon

    I am too still on 10.8.5 and realised - after reading this topic - wth was wrong after a reboot of the Mac Mini server running on a SSD...

     

    Could someone please send me the script as well to fix this problem? bas.kleingeldATme.com

     

    Thx! When is apple going to fix this buggy SMB-service?

  • by Hasimozart,

    Hasimozart Hasimozart Jul 17, 2014 11:29 PM in response to MrTweety
    Level 1 (0 points)
    Jul 17, 2014 11:29 PM in response to MrTweety

    Hello Mr Tweety and hello forum,

     

    could somebody send the script also to me?

    hasimozart@gmx.de

     

    I have the same problem after installation of an SSD into my Mac Pro 2008 and I spend many time for trying to solve the smb problem.

     

    Thank you very much and all have a nice weekend

  • by Hasimozart,

    Hasimozart Hasimozart Jul 18, 2014 1:27 AM in response to Hasimozart
    Level 1 (0 points)
    Jul 18, 2014 1:27 AM in response to Hasimozart

    Reply to my own message.

    I did it by myself and everything runs very well

     

    Thank you very, very much I spend so much time and it was soooooo simple to do the patch

     

    Kind Regards

    Hasimozart

  • by Rick729,

    Rick729 Rick729 Oct 19, 2014 9:48 AM in response to MrTweety
    Level 1 (0 points)
    Oct 19, 2014 9:48 AM in response to MrTweety

    A huge thank you to all who contributed to this thread.  Running Lion Server and (now in retrospect it all makes sense) recently upgraded to an SSD.  Mixed Win and Mac environment, could no longer connect to the network storage on the Windows machines.  Of course, I blamed it all on Windows 8!  Heaven forbid that it was a Mac problem.  I must admit, I love Mac products but their commitment to Server environments is atrocious.  In any event, all is currently well...thanks to all of you. 

  • by jump4way,

    jump4way jump4way Nov 19, 2014 8:40 AM in response to ArctiX-Arts
    Level 1 (0 points)
    Nov 19, 2014 8:40 AM in response to ArctiX-Arts

    I'm having this same problem. Any chance you could please send this plist file to me at andydelk@mac.com?

first Previous Page 3 of 3