2

I have a really weird problem. I have a Raspberry Pi running an SMB server that shows up in the sidebar of the Finder. I usually can just click on it and connect. Just today, it stopped working and gives me the error "Connection Failed". It has worked fine in the past. I'm running OS 10.8.4 on a Mac Pro. Our MBP (also 10.8.4) connects just fine, no problems. I see log messages in Console.app as such:

9/10/13 7:14:43.869 PM com.apple.kextd[12]: Request from non-root process 'netbiosd' (euid 222) to load /System/Library/Extensions/smbfs.kext - not allowed.
9/10/13 7:14:43.870 PM netbiosd[84]: Loading com.apple.filesystems.smbfs status = -603947004

Thoughts?

  • Have you already tried to connect directly to a directory in the share (Finder -> Go -> Connect to Server -> SMB://ipadress/share)? – cyphorious Sep 11 '13 at 7:45
  • Yes. And that works on both our MBP (10.8.4) and our other MB (10.6.8), just not on the Mac Pro – daviesgeek Sep 11 '13 at 16:34
  • 1
    Apple's man page for kextload says "For most kexts, kextload must run as the superuser (root). Kexts installed under /System/ with an OSBundleAllowUserLoad property set to true may be loaded via kextload by non-root users." So I'm wondering if that property has somehow been changed on your Mac Pro. On my 10.8.4 system, cat /System/Library/Extensions/smbfs.kext/Contents/Info.plist shows a line <key>OSBundleAllowUserLoad</key> followed by <true/>. What does that show on your Mac Pro? – Ashley Sep 11 '13 at 18:05
  • You can use defaults read /System/Library/Extensions/smbfs.kext/Contents/Info OSBundleAllowUserLoad in Terminal to get the answer of Ashely's question. The result is easier on the eyes. :-). a Result of 1 equals true, 0 equals false – markhunte Sep 14 '13 at 6:46
  • 1
    OK, here's a different idea... what does sudo kextunload /System/Library/Extensions/smbfs.kext; sudo kextutil -print-diagnostics -verbose 6 /System/Library/Extensions/smbfs.kext show? – Ashley Sep 15 '13 at 14:18
2

Essentially:

The operating system has lost its integrity

Can you be sure that all other parts of the OS are integral?

Recommendations

Verify the file system: use Disk Utility.

Verify the disk more thoroughly. For this you might use badblocks, or something like Drive Genius.

Use App Store to download the full OS X Mountain Lion installer for OS X 10.8.5.

Reinstall the OS.

  • I verified the FS…and as far as I can tell, everything is intact… – daviesgeek Sep 18 '13 at 20:11
  • 1
    Verification of an HFS Plus file system is not an assurance of integrity of data within that system. – Graham Perrin Sep 25 '13 at 15:44
2

First, try to restart File Sharing in the Sharing Preference Pane.

There is a bug in OS X that still lives in 10.8.5, where a race condition can cause File Sharing to start before an auth configuration is done, causing it to fail any SMB connection to network shares with any sort of privileges.

If this solved your problem, one way to automatise this process is to create a launchd agent with the following contents:

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

Save this file to ~/Library/LaunchAgents/com.mcdado.restart_smb, then load it by running the following command: sudo launchctl load ~/Library/LaunchAgents/com.mcdado.restart_smb

Source: SMB and Lion | Oceanside Coding

  • Unfortunately that didn't work… – daviesgeek Sep 18 '13 at 16:27
  • When I tried connecting to the SMB share over the CLI as shown in the linked post, I got this: mount_smbfs: failed to intitialize the smb library: Device not configured – daviesgeek Sep 18 '13 at 16:28
  • For anyone that comes from Google, I expanded the answer. It might help you, it might not. – mcdado May 17 '16 at 23:34
1

I've made a sequence of troubleshooting suggestions in the comments, which I'm recording as an answer below. If we find a solution, I'll edit this answer.

1. Ensure OSBundleAllowUserLoad is true

Apple's man page for kextload says

For most kexts, kextload must run as the superuser (root). Kexts installed under /System/ with an OSBundleAllowUserLoad property set to true may be loaded via kextload by non-root users.

So I'm wondering if that property has somehow been changed on your Mac Pro. On my 10.8.4 system, cat /System/Library/Extensions/smbfs.kext/Contents/Info.plist gives the longish listing shown at the bottom of this answer. (The last line should be </plist>... you might need to scroll to see it.)

Note that my listing includes the following:

    <key>OSBundleAllowUserLoad</key>
    <true/>

If your file doesn't include these lines (which state the key and the associated value mentioned in the man page above), I'd suggest:

  1. Back up the file - for example by using cp -p /System/Library/Extensions/smbfs.kext/Contents/Info.plist ~/Desktop/ (the -p argument preserves the dates and other metadata on the file)
  2. Edit the file to include the lines I mention above. Because the file is owned by root, you can't simply edit it in TextEdit. You could use sudo nano /System/Library/Extensions/smbfs.kext/Contents/Info.plist. Or there are workarounds allowing the use of TextEdit: see this answer. (By the way: I suspect it is possible to do this using defaults write, but I'd rather avoid the risk of invisibly writing to the wrong file by mistake.)
  3. Reboot and test.

I don't know how that key and value could have gone missing, but adding it back again seems worth a try. (I don't know if this'll work - I haven't tried it, and code signing might prevent this kind of modification.) Also: please be careful to back up and edit only this one file!

<?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>BuildMachineOSBuild</key>
    <string>12E53</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>smbfs</string>
    <key>CFBundleIdentifier</key>
    <string>com.apple.filesystems.smbfs</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>smbfs</string>
    <key>CFBundlePackageType</key>
    <string>KEXT</string>
    <key>CFBundleShortVersionString</key>
    <string>1.8.4</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.8.4</string>
    <key>DTCompiler</key>
    <string></string>
    <key>DTPlatformBuild</key>
    <string>4F250</string>
    <key>DTPlatformVersion</key>
    <string>GM</string>
    <key>DTSDKBuild</key>
    <string>12E53</string>
    <key>DTSDKName</key>
    <string></string>
    <key>DTXcode</key>
    <string>0440</string>
    <key>DTXcodeBuild</key>
    <string>4F250</string>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright © 2004-2013 Apple Inc. All rights reserved.</string>
    <key>OSBundleAllowUserLoad</key>
    <true/>
    <key>OSBundleLibraries</key>
    <dict>
        <key>com.apple.kext.triggers</key>
        <string>1.0.0d1</string>
        <key>com.apple.kpi.bsd</key>
        <string>9.0.0</string>
        <key>com.apple.kpi.iokit</key>
        <string>9.0.0</string>
        <key>com.apple.kpi.libkern</key>
        <string>9.0.0</string>
        <key>com.apple.kpi.mach</key>
        <string>9.0.0</string>
        <key>com.apple.kpi.private</key>
        <string>10.0.0d1</string>
        <key>com.apple.kpi.unsupported</key>
        <string>9.0.0</string>
    </dict>
    <key>OSBundleRequired</key>
    <string>Safe Boot</string>
</dict>
</plist>

The original poster (OP) tried this, but it didn't work.

2. Ask kextutil for some diagnostics

First, unload the kext (just in case... this doesn't do any harm if it is already unloaded):

sudo kextunload /System/Library/Extensions/smbfs.kext

Then, ask kextutil to show some diagnostics (-verbose 6 is the highest "amount of output" choice):

sudo kextutil -print-diagnostics -verbose 6 /System/Library/Extensions/smbfs.kext

3. The diagnostics output showed a dependency on a different kext, which was missing

The OP's output included the following:

...
/System/Library/Extensions/smbfs.kext - no dependency found for com.apple.kec.corecrypto.
...
Dependency Resolution Failures:
    Only Apple kexts may link against com.apple.kpi.private.
    No kexts found for these libraries:
        com.apple.kec.corecrypto

... and we concluded that /System/Library/Extensions/corecrypto.kext was missing, although we don't know why.

4. Copy across the missing corecrypto.kext from another machine (running the same version of OS X)

The OP copied across the missing kext, rebooted and retested. We still hadn't found a solution. However, the kextutil diagnostic output had changed, now showing the (complete listing) below:

Kext user-space log filter changed from 0xff2 to 0xfff.
Kext kernel-space log filter changed from 0xff2 to 0xfff.
Kext library architecture set to i386.
No kernel file specified, using '/mach_kernel' 
Kext library recording diagnostics for: validation authentication dependencies warnings.
/System/Library/Extensions/smbfs.kext has an Apple prefix but no copyright.
/System/Library/Extensions/smbfs.kext has an Apple prefix but no copyright.
/System/Library/Extensions/smbfs.kext has an Apple prefix but no copyright.
Diagnostics for /System/Library/Extensions/smbfs.kext:
Dependency Resolution Failures: 
    Only Apple kexts may link against com.apple.kpi.private.

5. Perhaps the smbfs.kext bundle is corrupt?

My guess, based on the above output, is that the OS thinks smbfs.kext is not an Apple extension (when it actually is). I suggested the OP restore smbfs.kext from a backup, or copy from another machine. Results currently unknown.

For comparison, on my machine, where SMB seems to be working properly, the complete output of sudo kextutil -print-diagnostics -verbose 6 /System/Library/Extensions/smbfs.kext is:

Kext user-space log filter changed from 0xff2 to 0xfff.
Kext kernel-space log filter changed from 0xff2 to 0xfff.
Kext library architecture set to x86_64.
No kernel file specified, using '/mach_kernel' 
Kext library recording diagnostics for: validation authentication dependencies warnings.
/System/Library/Extensions/smbfs.kext appears to be loadable (not including linkage for on-disk libraries).
Loading /System/Library/Extensions/smbfs.kext.
Reading load info for 8 kexts.
Reading loaded kext info from kernel.
(kernel) User-space log flags changed from 0x0 to 0xfff.
(kernel) Received 'Get Loaded Kext Info' request from user space.
(kernel) Returning loaded kext info.
Loaded kext info:
{
"com.apple.kpi.mach" = {
    "OSBundleWiredSize" = 2188
    "CFBundleIdentifier" = "com.apple.kpi.mach"
    "OSBundleUUID" = <4edbbc26 0d734a03 b9f2131a ac114ede>
    "OSBundleLoadAddress" = -551895728128
    "OSBundleLoadTag" = 5
    "OSBundleStarted" = true
    "OSBundleCompatibleVersion" = "8.0.0d0"
    "OSKernelResource" = true
    "CFBundleVersion" = "12.4.0"
    "OSBundlePath" = 
        "//System/Library/Extensions/System.kext/PlugIns/Mach.kext"
    "OSBundleRetainCount" = 90
    "OSBundlePrelinked" = true
    "OSBundleIsInterface" = true
    "OSBundleLoadSize" = 2188
}
"com.apple.kpi.libkern" = {
    "OSBundleWiredSize" = 39416
    "CFBundleIdentifier" = "com.apple.kpi.libkern"
    "OSBundleUUID" = <5cfa490e 7e0540f5 bb983f3e 8ca54d37>
    "OSBundleLoadAddress" = -551895687168
    "OSBundleLoadTag" = 4
    "OSBundleStarted" = true
    "OSBundleCompatibleVersion" = "8.0.0d0"
    "OSKernelResource" = true
    "CFBundleVersion" = "12.4.0"
    "OSBundlePath" = 
        "//System/Library/Extensions/System.kext/PlugIns/Libkern.kext"
    "OSBundleRetainCount" = 104
    "OSBundlePrelinked" = true
    "OSBundleIsInterface" = true
    "OSBundleLoadSize" = 39416
}
"com.apple.kpi.bsd" = {
    "OSBundleWiredSize" = 26732
    "CFBundleIdentifier" = "com.apple.kpi.bsd"
    "OSBundleUUID" = <ed0f756e c36b41ee 9e630573 11c12b4e>
    "OSBundleLoadAddress" = -551895646208
    "OSBundleLoadTag" = 1
    "OSBundleStarted" = true
    "OSBundleCompatibleVersion" = "8.0.0b1"
    "OSKernelResource" = true
    "CFBundleVersion" = "12.4.0"
    "OSBundlePath" = 
        "//System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext"
    "OSBundleRetainCount" = 71
    "OSBundlePrelinked" = true
    "OSBundleIsInterface" = true
    "OSBundleLoadSize" = 26732
}
"com.apple.kpi.iokit" = {
    "OSBundleWiredSize" = 112620
    "CFBundleIdentifier" = "com.apple.kpi.iokit"
    "OSBundleUUID" = <bd6bb21a 080d4f2b a6590437 d164ecde>
    "OSBundleLoadAddress" = -551895605248
    "OSBundleLoadTag" = 3
    "OSBundleStarted" = true
    "OSBundleCompatibleVersion" = "7.0"
    "OSKernelResource" = true
    "CFBundleVersion" = "12.4.0"
    "OSBundlePath" = 
        "//System/Library/Extensions/System.kext/PlugIns/IOKit.kext"
    "OSBundleRetainCount" = 99
    "OSBundlePrelinked" = true
    "OSBundleIsInterface" = true
    "OSBundleLoadSize" = 112620
}
"com.apple.kpi.unsupported" = {
    "OSBundleWiredSize" = 9164
    "CFBundleIdentifier" = "com.apple.kpi.unsupported"
    "OSBundleUUID" = <0a01a811 58284493 99b48233 fd6edeaa>
    "OSBundleLoadAddress" = -551895699456
    "OSBundleLoadTag" = 7
    "OSBundleStarted" = true
    "OSBundleCompatibleVersion" = "8.0.0b1"
    "OSKernelResource" = true
    "CFBundleVersion" = "12.4.0"
    "OSBundlePath" = 
        "//System/Library/Extensions/System.kext/PlugIns/Unsupported.kext"
    "OSBundleRetainCount" = 54
    "OSBundlePrelinked" = true
    "OSBundleIsInterface" = true
    "OSBundleLoadSize" = 9164
}
"com.apple.kext.triggers" = {
    "OSBundleWiredSize" = 20480
    "CFBundleIdentifier" = "com.apple.kext.triggers"
    "OSBundleStarted" = true
    "OSBundleCPUType" = 16777223
    "OSBundleCompatibleVersion" = "1.0.0d1"
    "OSBundleUUID" = <e376df1d 63633e78 af0820ba bbf94701>
    "OSKernelResource" = false
    "CFBundleVersion" = "1.0"
    "OSBundleLoadTag" = 109
    "OSBundleLoadAddress" = -551874535424
    "OSBundleDependencies" = (
        1
        4
        3
        7
        6
        5
    )
    "OSBundlePath" = "//System/Library/Extensions/triggers.kext"
    "OSBundleRetainCount" = 1
    "OSBundleCPUSubtype" = 3
    "OSBundlePrelinked" = true
    "OSBundleIsInterface" = false
    "OSBundleLoadSize" = 20480
}
"com.apple.kpi.private" = {
    "OSBundleWiredSize" = 20492
    "CFBundleIdentifier" = "com.apple.kpi.private"
    "OSBundleUUID" = <9a83c9f5 ff6145e6 837c7cf7 e10f3654>
    "OSBundleLoadAddress" = -551895724032
    "OSBundleLoadTag" = 6
    "OSBundleStarted" = true
    "OSBundleCompatibleVersion" = "8.0.0b1"
    "OSKernelResource" = true
    "CFBundleVersion" = "12.4.0"
    "OSBundlePath" = 
        "//System/Library/Extensions/System.kext/PlugIns/Private.kext"
    "OSBundleRetainCount" = 40
    "OSBundlePrelinked" = true
    "OSBundleIsInterface" = true
    "OSBundleLoadSize" = 20492
}
}

/System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext (version 12.4, UUID ED0F756E-C36B-41EE-9E63-057311C12B4E) is loaded.
/System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext (version 12.4): is started.
setting load address of /System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext to 0xffffff7f8074c000
/System/Library/Extensions/System.kext/PlugIns/Mach.kext (version 12.4, UUID 4EDBBC26-0D73-4A03-B9F2-131AAC114EDE) is loaded.
/System/Library/Extensions/System.kext/PlugIns/Mach.kext (version 12.4): is started.
setting load address of /System/Library/Extensions/System.kext/PlugIns/Mach.kext to 0xffffff7f80738000
/System/Library/Extensions/System.kext/PlugIns/Libkern.kext (version 12.4, UUID 5CFA490E-7E05-40F5-BB98-3F3E8CA54D37) is loaded.
/System/Library/Extensions/System.kext/PlugIns/Libkern.kext (version 12.4): is started.
setting load address of /System/Library/Extensions/System.kext/PlugIns/Libkern.kext to 0xffffff7f80742000
/System/Library/Extensions/System.kext/PlugIns/IOKit.kext (version 12.4, UUID BD6BB21A-080D-4F2B-A659-0437D164ECDE) is loaded.
/System/Library/Extensions/System.kext/PlugIns/IOKit.kext (version 12.4): is started.
setting load address of /System/Library/Extensions/System.kext/PlugIns/IOKit.kext to 0xffffff7f80756000
/System/Library/Extensions/System.kext/PlugIns/Unsupported.kext (version 12.4, UUID 0A01A811-5828-4493-99B4-8233FD6EDEAA) is loaded.
/System/Library/Extensions/System.kext/PlugIns/Unsupported.kext (version 12.4): is started.
setting load address of /System/Library/Extensions/System.kext/PlugIns/Unsupported.kext to 0xffffff7f8073f000
/System/Library/Extensions/triggers.kext (version 1.0, UUID E376DF1D-6363-3E78-AF08-20BABBF94701) is loaded.
/System/Library/Extensions/triggers.kext (version 1.0): is started.
setting load address of /System/Library/Extensions/triggers.kext to 0xffffff7f81b6e000
/System/Library/Extensions/System.kext/PlugIns/Private.kext (version 12.4, UUID 9A83C9F5-FF61-45E6-837C-7CF7E10F3654) is loaded.
/System/Library/Extensions/System.kext/PlugIns/Private.kext (version 12.4): is started.
setting load address of /System/Library/Extensions/System.kext/PlugIns/Private.kext to 0xffffff7f80739000
Omitting loaded kext /System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext from mkext for kernel load.
Omitting loaded kext /System/Library/Extensions/System.kext/PlugIns/Mach.kext from mkext for kernel load.
Omitting loaded kext /System/Library/Extensions/System.kext/PlugIns/Libkern.kext from mkext for kernel load.
Omitting loaded kext /System/Library/Extensions/System.kext/PlugIns/IOKit.kext from mkext for kernel load.
Omitting loaded kext /System/Library/Extensions/System.kext/PlugIns/Unsupported.kext from mkext for kernel load.
Omitting loaded kext /System/Library/Extensions/System.kext/PlugIns/Private.kext from mkext for kernel load.
Omitting loaded kext /System/Library/Extensions/triggers.kext from mkext for kernel load.
Adding /System/Library/Extensions/smbfs.kext to mkext.
/System/Library/Extensions/smbfs.kext added 245568-byte noncompressed executable to mkext.
Created mkext for architecture x86_64 containing 1 kexts.
Loading /System/Library/Extensions/smbfs.kext.
(kernel) User-space log flags changed from 0x0 to 0xfff.
(kernel) Received kext load request from user space.
(kernel) Received request from user space to load kext com.apple.filesystems.smbfs.
(kernel) Loading kext com.apple.filesystems.smbfs.
(kernel) Kext com.apple.kpi.bsd is already loaded.
(kernel) Kext com.apple.kpi.mach is already loaded.
(kernel) Kext com.apple.kpi.libkern is already loaded.
(kernel) Kext com.apple.kpi.iokit is already loaded.
(kernel) Kext com.apple.kpi.unsupported is already loaded.
(kernel) Kext com.apple.kext.triggers is already loaded.
(kernel) Kext com.apple.kpi.private is already loaded.
(kernel) Allocated link buffer for kext com.apple.filesystems.smbfs at 0xffffff7f949c1000 (229376 bytes).
(kernel) Kext com.apple.filesystems.smbfs executable loaded; 56 pages at 0xffffff7f825c1000 (load tag 146).
(kernel) Kext com.apple.filesystems.smbfs calling module start function.
(kernel) Kext com.apple.filesystems.smbfs is now started.
(kernel) Kext com.apple.filesystems.smbfs loaded.
Successfully loaded /System/Library/Extensions/smbfs.kext.
/System/Library/Extensions/smbfs.kext successfully loaded (or already loaded).
  • I tried it, both adding just the key and pasting the whole file. Neither works :/ – daviesgeek Sep 15 '13 at 6:42
1

You might want to restore file/folder permissions. It generally helps when things stop working.

Go to Applications/Disk Utility Click on your boot volume on the left hand side, then "Repair Permissions" on the right.

It may work.

  • Ooh good suggestion. Even though it's supposedly not a "fix-all" solution, it may help… – daviesgeek Sep 14 '13 at 18:34
  • No accepted answer yet, so I'll assume this is still not working. Have you attempted connecting to the SMB with someone else's mac? This will just verify that the issue is with your mac, and not with the device in question. – wrossmck Oct 14 '13 at 21:05
  • "Our MBP (also 10.8.4) connects just fine, no problems." – daviesgeek Oct 14 '13 at 22:54
  • Ok, so after looking through comments and reading what has been checked and tested, I would suggest Graham's Answer of reinstalling the OS. Alternatively Wait around for a few weeks and get Mavericks (I'd recommend a full re-install, either way)… Obviously, this isn't an optimum solution, but considering we can't determine why corecrypto doesn't want to work, I feel there is little other choice. :( – wrossmck Oct 17 '13 at 22:27
  • Okay thanks for the suggestion…seems like my only option right now; I just don't want to take the time to do that :) – daviesgeek Oct 19 '13 at 21:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .