SMB File Sharing Stopped Working In OS X Lion (Resolved)

Standard

The Short Version: Every now and then File Sharing on the target machine running OS X Lion quits working. I must disable and then re-enable File Sharing to get it working again. So far I haven’t found a permanent fix.

Today I discovered that I could no longer access shared files on my iMac from a MacBook Pro via SMB File Sharing. Both systems are running Lion. The file sharing was working only a day prior. This problem was rather odd. I could access file shares on other machines from that Mac without a problem. I could also access that Mac via Screen Sharing using the same credentials that File Sharing wasn’t accepting.

I’m not sure what caused this problem. The only major change I made on the iMac since yesterday was to run a Full Defrag using iDefrag 2. I don’t know if this actually caused the problem (or if it even could). While troubleshooting the issue I repaired permissions on the drive, but that didn’t make a difference.

Though the short name, originally established under Snow Leopard, for the account had been working I tried using only the long name. That didn’t work either. Every time I entered my credentials the login prompt shook to indicate it didn’t work.

Finally, I just went into the File Sharing Options, unchecked SMB (AFP wasn’t checked to start with) and saved this change. This turned off all file sharing. Next, I went back into the settings and re-enabled SMB File Sharing.

It worked.

Despite the fact that the system settings weren’t any different I can once again access shared files over SMB. My best guess is that something hadn’t been fully re-enabled. Perhaps during the defrag process some permission was changed that prevented the sharing from working. By disabling and then re-enabling the service it may have re-established the appropriate file permissions. Of course, that’s just speculation.

Updated 11/24/2011: The fix wasn’t permanent. The same problem cropped up again and, as before, the same solution also corrected the problem.

Updated 06/09/2012: Yep. It still happens despite various system updates that have been released since. Every now and then I’ll attempt to connect and then find that I have to disable and re-enable the service to make it work again.

Remotely Solving a Windows Problem Using Two Macs

Standard

My wife’s grandfather recently ran into a problem with his new laptop. At some point he had to restart his laptop but wasn’t able to login Windows (Windows 7 Home Edition). We’re not sure if someone changed the password without his knowledge or if he forgot that he had a passwords (it’s possible that he simply hadn’t restarted his computer since it was given to him).

The simple solution is to download a Windows password reset tool. There are many free tools available for download from the Web. In this case, I chose to use the Offline NT Password and Registry Editor.

However, the plan was to have his laptop for only a short window. My wife picked it up last Sunday and planned to return it the following Friday. Normally, that wouldn’t be an issue, except I was out of town and my wife had not used this type of tool before.

Fortunately, we both have Macs. Specifically, MacBook Pro systems. By using FaceTime and Screen Sharing we were able to burn the tool to a pre-built ISO, run it on the laptop and successfully clear the password.

I used Screen Sharing to see and chat with my wife. I also used it to view the display of the Windows laptop (from the camera on her Mac) and inform my wife which options to select. Screen Sharing was useful because I could guide my wife through downloading and burning the ISO image for the tool.

You certainly don’t have to use Macs to remotely diagnose and provide assistance. Combinations of devices, such as an iPhone and an iPad or even a mix of Windows and Macs can be used, though Windows to Mac setups will require cross-platform tools to replace FaceTime and Screen Sharing.

The point of this article is simple to serve as a reminder that remote diagnosis of a computer can often be done using built-in or free tools.

Using OS X Screen Sharing with a Mac Not Listed Under Shared

Standard

In some situations you may not see the target Mac listed under Shared in the finder. In addition, this tip is specific for situations in which the Screen Sharing service is known to work.

Connecting is similar to accessing a Samba network share. In this example the target machine’s IP address is 192.168.1.5:

  1. On the Finder menubar select Go
  2. Choose Connect to Server
  3. In the Server Address box type vnc://192.168.1.5 [or your target machine IP]
  4. If you want to save it under Favorite Servers click the plus button
  5.  Click Connect
  6. Provide the appropriate authentication credentials

A while back I posted another tip about enabling and disabling Screen Sharing from a terminal, which can be used to change the status of Screen Sharing remotely via an SSH connection.

Enable or Disable OS X Screen Sharing from the Terminal

Standard

If you have a need to enable or disable Screen Sharing from a terminal in OS X the commands are very simple. I’ve used these commands in 10.6 (Snow Leopard).

Enable
sudo touch /etc/ScreenSharing.launchd

Disable
sudo rm /etc/ScreenSharing.launchd

Source: rentzsch.tumblr.com | Starting VNC remotely via kickstart

Updated 06/07/2012: It seems that the process for doing this has changed in OS X Lion based on a post in Ryan’s Tech Notes. I used these commands and they worked as described.

Enable
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all

Disable
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off