Apple Event: May 7th at 7 am PT

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

WORKGROUP in Lion - Cannot network with Win 7

Like many I cannot network with Win 7 - first Mac ever and thought it would be easy but seems a disaster


I ahve read all about SMB and problems that people are having and I am one of them - I enter my password and username and I keep getting an error.


Just wondering does it have anything to do with the "Workgroup" of the Mac. I seem to add "Workgroup" as my workgroup but it does not save it - everytime I look later it is blank again. Do you think it has anything to do with the Workgroup setting?

MacBook Air, Mac OS X (10.7)

Posted on Jul 30, 2011 4:28 AM

Reply
21 replies

Dec 14, 2012 8:51 AM in response to Howard_K

A solution might be to have this run automatically at startup:

sudo touch "/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist" password=myadminpassword


This works fine within Terminal (replace myadminpassword, with you password) and the WINS Workgroup is updated immediatly with the Value in the com.apple.smb.server.plist file.


However I don't know how to do this automatically. . . I read what I could on LaunchAgents and got the App "Lingon 3" to help make it easier, but it did not want to run this command in root.


Ideas?

Dec 24, 2012 1:31 AM in response to Howard_K

Hello all


Thanks so much for all this, I was just getting mad until I read this thread.

So, same thing here: Workgroup was getting lost when my iMac boots up (or gets out of sleep mode). Solution is to run this "sudo touch..." command.


I can't seem to find a solution as how to run it when the iMac wakes up, but when it boots up, Applescript is what you're looking for.

Run AppleScript editor, create a new script and insert this:

{do shell script "sudo touch /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist" user name "your_user" password "your_pwd" withadministrator privileges} (don't insert the brackets...)


Save the script, somewhere easy to find (like documents).

Then, in the System Preferences (not sure of the English name, sorry), go in Users and Groups (again, sorry).

Go in tab Start (or Open or... actually, the 2nd tab of your user, next to password). This tab manages all the scripts and programs that are to be run when your user logs in. Just drag&drop the script you've created within the list.

Next time you start your Mac, the sudo touch command will be automatically run.


Cheers

WORKGROUP in Lion - Cannot network with Win 7

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