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

Previous Page 2 of 3 last Next
  • by PeterPeety,

    PeterPeety PeterPeety Jun 11, 2013 1:14 AM in response to ArctiX-Arts
    Level 1 (0 points)
    Jun 11, 2013 1:14 AM in response to ArctiX-Arts

    Dear ArctiX-Arts, could you please send me the script too? I don´t get how its done. Running OS 10.8.4.

    mailto:pr5278@googlemail.com

     

    Tx so much, Peety

  • by raily74,

    raily74 raily74 Jun 11, 2013 3:48 AM in response to MrTweety
    Level 1 (0 points)
    Jun 11, 2013 3:48 AM in response to MrTweety

    Hi Peety,

     

    I've sent it to you by mail. To get along follow the steps of "iDeviceDreamer" (post nr. 3 of this thread).

     

    Good luck, Michael

  • by PeterPeety,

    PeterPeety PeterPeety Jun 12, 2013 2:25 AM in response to raily74
    Level 1 (0 points)
    Jun 12, 2013 2:25 AM in response to raily74

    Hey Michael, thank you so much. It worked immediately! Really appreciate your help,

     

    cheers, Peety

  • by samoceta,

    samoceta samoceta Jun 13, 2013 1:40 PM in response to MrTweety
    Level 1 (0 points)
    Jun 13, 2013 1:40 PM in response to MrTweety

    Hey guys.

     

    Could anybody send me that email aswell.

    That would help me alot and I would be very greatful.

     

    Thanks!!

     

    alex.samoceta@gmail.com

  • by Anthony W.,

    Anthony W. Anthony W. Jun 13, 2013 1:47 PM in response to samoceta
    Level 1 (15 points)
    Jun 13, 2013 1:47 PM in response to samoceta

    You should have a zip file soon. Follow the steps from ideviceDreamer and you should be golden.

  • by rommm,

    rommm rommm Jul 8, 2013 8:56 AM in response to MrTweety
    Level 1 (0 points)
    Jul 8, 2013 8:56 AM in response to MrTweety

    I was having the same smb nightmare on a new server install so have used this script.

     

    I am getting tons and tons of these errors now in the sys log:

    Jul  8 08:41:15 sfs244 com.apple.launchd[1] (org.samba.nmbd[636]): Exited with code: 1

    Jul  8 08:41:15 sfs244 com.apple.launchd[1] (org.samba.nmbd): Throttling respawn: Will start in 10 seconds

     

    smb appears to be running just fine, the users can get on but I am a bit worried about these respawn errors.

    Anyone else having these?

     

    Should I have removed

    org.samba.nmbd.plist

    org.samba.smbd.plist

    from /Library/LaunchDaemons ??

    Is it just trying to start smb twice or something?

  • by dathan42,

    dathan42 dathan42 Jul 13, 2013 3:24 AM in response to ArctiX-Arts
    Level 1 (0 points)
    Jul 13, 2013 3:24 AM in response to ArctiX-Arts

    After calling Apple Support with no resolution I thought I was the only one experiencing this problem so was pleasantly suprised to find this post. Great that you guys got a fix for it. Would be good if Apple could fix this in the upcoming Mavericks OSX release.

     

    I would appreciate it if someone could also please send me the script too?

    mail to:  dean.athan@hotmail.com

     

    Thank you for your help.

  • by dathan42,

    dathan42 dathan42 Jul 13, 2013 7:11 AM in response to rommm
    Level 1 (0 points)
    Jul 13, 2013 7:11 AM in response to rommm

    All,

    Following my earlier post; don't worry about semding me a copy of the script. I just managed to download a free .plist editor and created the .plist and followed the previous procedures and my problem is now also confirmed as fixed. Thank you everyone, this post is a lifesaver!

     

    rommm, in regards to your problem; I have looked at my sytem log and cannot see the same problem as you are seeing.  It would be good to hear if anybody else is experiencing your problem.

    Thanks.

  • by rommm,

    rommm rommm Jul 18, 2013 11:50 AM in response to dathan42
    Level 1 (0 points)
    Jul 18, 2013 11:50 AM in response to dathan42

    Any chance someone could take a screentshot of the /Library/LaunchDaemons folder?

     

    Does everyone have those two org.samba plists?

     

    I am still having problems with occasional disconnects(like two times a week) for the pc users and tons of throttling errors in the system log. Last time it went away when I stopped and restarted smb but then started up again later.

     

    screenshot 2013-07-18 at 11.46.28 AM.jpg

     

    screenshot 2013-07-18 at 11.48.13 AM.jpg

  • by dathan42,

    dathan42 dathan42 Jul 19, 2013 6:35 AM in response to rommm
    Level 1 (0 points)
    Jul 19, 2013 6:35 AM in response to rommm

    rommm, As requested here is the screen dump of the /Library/LaunchDaemons folder on my MacBookPRO:

     

    Screen Shot 2013-07-19 at 11.28.50 PM.png

    Note the fix from the above posts are working really great for for me in two different MacBookPRO's.

  • by rommm,

    rommm rommm Jul 19, 2013 1:51 PM in response to dathan42
    Level 1 (0 points)
    Jul 19, 2013 1:51 PM in response to dathan42

    Thanks for the screen dump! Turns out SMBup was causing a billion throttling respawn errors in my sys log and crashed smb a few times a week. I had opened it but didn't realize it installed files. I had decided not to use it because it looked like it was a separate user system and all my users are Active directory users.

     

    The SMBup uninstaller did entirely work either, I had to go manually remove these files:

    sudo rm /Library/LaunchDaemons/org.samba.nmbd.plist

    sudo rm /Library/LaunchDaemons/org.samba.smbd.plist

     

    Once I got rid of that, the script from this thread is working great.

     

    Thanks!!!

  • by rommm,

    rommm rommm Jul 19, 2013 1:55 PM in response to rommm
    Level 1 (0 points)
    Jul 19, 2013 1:55 PM in response to rommm

    Oh also, if you know vi or vim you can just do this:

     

    sudo touch /Library/LaunchDaemons/com.me.restart_smb.plist

    sudo chown root:wheel /Library/LaunchDaemons/com.me.restart_smb.plist

    sudo chmod 644 /Library/LaunchDaemons/com.me.restart_smb.plist

     

    sudo vi /Library/LaunchDaemons/com.me.restart_smb.plist

     

    Then add the script:

    for vi you just press i for insert, paste in the script, then press esc, and :w! to exit

     

    <?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>

     

    Then reboot

  • by tpedry,

    tpedry tpedry Sep 6, 2013 11:38 PM in response to iDeviceDreamer
    Level 1 (0 points)
    Sep 6, 2013 11:38 PM in response to iDeviceDreamer

    I am sorry, you seem to have given a very detailed list of how to install this script, but i got stuck at "copy com.me.restart_smb.plist". 

     

    I have been calling tech support about the problem and scouring the internet for anything I could find, but I have not been able to try your solution because I need more detail. What, where from and how are you copying the "com.....plist"? Can you email me the script as well? tim@pedryremodeling.com

     

    Thank you for  the help. I was running from PC because of viruses and it seems that I have come over to the side that only has things half baked.....I don't know what to do!!

     

    thank you Tim

  • by dathan42,

    dathan42 dathan42 Sep 7, 2013 6:12 AM in response to tpedry
    Level 1 (0 points)
    Sep 7, 2013 6:12 AM in response to tpedry

    Tim,

    As requested I have emailed you the plist script.

     

    In reference to your other question you need to:   

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

     

    So the file ends up in the  /Library/LaunchDaemons folder on your Mac as per my screen dum in my earlier post (above) dated

    Jul 19, 2013 6:35 AM.

    .


  • by Sidney Bristow,

    Sidney Bristow Sidney Bristow Sep 12, 2013 6:33 PM in response to MrTweety
    Level 1 (70 points)
    Sep 12, 2013 6:33 PM in response to MrTweety

    Can somebody confirm if the latest build 10.8.5 has addressed this issue?

Previous Page 2 of 3 last Next