You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Can't connect via SMB

Prior to installing Lion, I would connect to our shared drives at work via SMB. Today, after installing Lion, I can't connect to my shared drives. The one SMB connection that works is to an FTP server. I connect via SMB to map the drive in my Finder rather than using an FTP program. This still works fine.


However, I can't connect to the shared drive for file sharing. In the Connect to Server box, I have "smb://PathToFiles" . Is smb:// the correct prefix to use now that Lion is funky with SMB support?


I'm sorry...I really don't know much about SMB connections, what kind of server it is that I'm trying to connect to, or much else. I know we run Windows Exchange, but I'm not sure if that's the server that hosts these shared drives...I just need to connect to get back to work. Any help would be AWESOME.

Posted on Jul 21, 2011 1:55 PM

Reply
132 replies

Aug 23, 2011 10:36 PM in response to upeace

Going to summarize the problem I had and what I've done to try and fix it. If it matches yours you are welcome to chime in with other tests, and if I find a solution I will post it.



First, I have a Windows File Server and am trying to connect from a Mac running OS X 10.07 (Lion). I just upgraded this afternoon, and so far there has been a mixed bag of likes & dislikes, this is one of the dislikes and appears plain as day to be a new bug in OS X with no documentation.





The server is working fine, two other computers on the network could connect and not 13 hours before Snow Leopard on this machine was using it to backup files.



I use the connect-to option in finder, with a standard line:



smb://server/share



This gives me a big fat "There was a problem connecting to the server" error, which says I don't have permissions. Funny, because I never entered any permissions, it didn't let me.



I tried entering just the server without the share, and it displays a list of shares on the system (I had never tried it before, so not sure if that's new), but as soon as I select one I am met with the same error.





The Problem:



The "Connect To" option is not asking you for your credentials, former iterations of OS X would ask if you were a guest or registered user, and would prompt you for a username and password. Hence one solution is to add your username and password as a user with access rights to the system managing the file sharing (If the folder is shared by username and not a group you have to add the user, otherwise you need the new user to be a member of the group with shared access rights).



Obviously adding a new username per machine/user is an unacceptable solution for a business environment, and I doubt it would work on systems with domains (like me@company.org), only for computer name or ip address.





It's quite possible we simply aren't "doing it right", which is to say maybe there is some way to specify alternative credentials, but I spent three hours scouring for documentation and couldn't find any from apple or elsewhere.



At one point I got lucky and spotted my system in finders Network>All..., and was able to access using the "connect as" setting in there, but now it isn't displayed so probably not a reliable workaround.

Aug 24, 2011 11:02 AM in response to CDeLorme

I found a way to get it working via command line.



As I stated in my former post, Samba is working in Lion, but the UI for it isn't. When you use the Connect to Server option, it doesn't ask you for your credentials, it automatically assumes your Mac Credentials (username & password), which generally doesn't work.





Anyways, here is the solution:



-> Launch Terminal



-> Create a folder, for my test I created a desktop folder

mkdir ~/Desktop/MyMedia



-> Command Line Format to mount the SMB share:

mount -t smbfs //Username@ServerOrIP/Media ~/Desktop/MyMedia



-> A prompt will ask for your password





Some quirks, terminal will still show the folder name as MyMedia, but the desktop and finder display it as "Media" (the share name). However, it works, I am in and able to access my shared files.

Aug 24, 2011 3:26 PM in response to CDeLorme

I get prompted for credentials when I do this via the gui.


I also see on the server end that it is using the correct username (ie. the one i enter into the gui, not the Mac ones as you suggest)


Also, mounting the share manually via the command line still only works for access via the command line for me.


Glad it's working for you now though 🙂

Aug 25, 2011 10:20 AM in response to upeace

The actual bug is that Lion is failing to pull the saved username from the Mac KeyChain.

Instead it is using your mac username.


Therefore if your mac username is not equal to your server account name; it will fail to mount, if you use saved credentials



*** Here's the tested workaround we are using.


1) Do NOT save the user credentials for the network share in the keychain. (If you already did; then use KeyChain program to delete the saved credentials ((search for server name and delete items of type "network password")) )


2) Change your Finder Cmd-K URLs to include your Network Short username (your NLTM username).


Examples:


smb://NETWORKUSERshortNAME@servername/SHARENAME

smb://networkdomain\networkusershortname@server/SHARENAME



You can't use UPN network names because the Extra @ symbol will confuse some servers.

Your mileage will vary if you do:



smb://username@domainname.com@servername/ShareName


3) Finally when prompted for username and password; enter your network password and click OK. Do not save the credentials.

Sep 11, 2011 4:18 PM in response to upeace

Cross posting from: https://discussions.apple.com/thread/3196311?answerId=15810135022#15810135022


~~~~~~~~~~~


After several full Saturdays and Sundays chasing this down (and about 300 restarts), I have my Windows to Apple SMB Share connectivity issue narrowed down and worked around. This applies to OSx 10.7.0 and 10.7.1 on a MacMini (7/2011 Server w/SSD) with Shares under SMB, being connected to by Windows 7.


Basic Environment:


IF

1) you restart OSx and your Windows systems CANNOT connect because you get a prompt for userid/password or a not accessable message AND

2) after 2 or 3 minutes you can Start and Stop SMB Sharing with either Server.app (File Sharing) or Preferences/Sharing/File Sharing/Options/SMB on/off (individual IDs do _not_ have to be turned on / off) AND

3) the userid and password are exactly the same on both the client (Win7 or OSx) and the Sharing system AND

4) then Windows sytems can connect


Then the problem is a Race Condition in the Services Startup of OSx. The SMB service is dependent on some security process (guessing) which is completely late in the startup cycle.


You can test this with the following commands in a terminal window (AFTER the system is up and quiesced):

sleep 60

sudo serveradmin stop smb

sleep 5

sudo serveradmin start smb


After talking to Apple Enterprise Support to confirm the issue, I moved the above commands into a launchd script as a work around (this is NOT recommended unless you know what you're doing). Note the initial 60 second sleep - 30 seconds was not long enough. This has been filed with Apple Enginering, they'll figure out what to do about it going forward.


Part of my problem, is that I'm on a new MacMini (7/2011) which boots from local SSD, it just boots up too fast. If you're on a slower older system - this should not be an issue.


Some other things which I learned on this journey:

1) Do not use unload/load of the SMB plist - that does not work for this issue

2) OD accounts do not work. Wish they would, they dont

3) Hacking the windows registry as in previous versions to support the previous Samba SMB release (10.6.x and lower) is NOT the problem with any 10.7 release. OSx 10.7 Supports SMB2, as does Vista and Win7.

Oct 3, 2011 4:23 PM in response to jan78

jan78 wrote:


A Solution for mounting Lion SMB Shares from a linux client.

(I'm using an ArchLinux with Samba 3.5.10-1 and cifs-utils 4.9-3, but it shouldn't matter)


mount.cifs needs the additional options "nounix,sec=ntlmssp"


i.e. mount.cifs //192.168.xxx.xxx/test /mnt/test/ -o user=******,password=******,nounix,sec=ntlmssp


I was getting the following:


WARN [negotiate.cpp:266] 192.168.1.33 SMB client not supported - Unicode, NT Errors, Long Names and Extended Security are required


And then I tried adding "sec=nltlmssp" to my mounting options and went away.


HOWEVER, I still get the following from "/usr/sbin/smbd -debug -stdout"

smb1_dispatch_one [smb_dispatch.cpp:377] dispatching SMB_COM_NEGOTIATE

socket_look [unix_socket.cpp:285] socket_look: rdsz 0 ---> EPIPE


Anybody else hit this and getting anything similar? I'm guessing my EPIPE is the problem. I even tried "/etc/init.d/iptables stop" on my Linux box to open up the firewall, but this was to avail.

Nov 3, 2011 8:49 AM in response to upeace

Hi, I have Active Directory on Windows Server 2008 with DFS file share, some Windows and some MAC computer. Till 10.6 using dfs via finder cmd+k and smb://server/share works fine for all user.


Now with LION my Windows-Admin-Account works still fine. No problem.

BUT if I login with another account (maria) with less rights I got errors on some shares. I find out that maria has no read right for the root folder on the problem-shares.


OK-Share: maria has at least read right on the root folder! ( Traverse folder / execute file )

Problem-Share: maria has only the following rights on the root folder.

List folder / read data, Read attributes, Read extended attributes.

For some subfolders has maria of couse more rights.


User uploaded file


We use this settings, because nobody should see folders where he/she have no access rights. With other words everybody see only the folder where he/she has access rights and the other folders not.

Till Lion a good solution ;-)


Now I map the share ( with errors ) and Finder can´t access the share. But with Terminal or muCommander I can access all sharefolders.


Hope Apple bring a fix soon.


kkausu

Nov 6, 2011 11:09 AM in response to Jagoan

i have this problem too, but only to one 2008 r2 server. i installed 2 new servers (different sites) they have the same firewall rules, same sp level same updates etc.


i can connect to both via smb on the lan but cannot talk to one of them when on the vpn.


i have tried mounting via terminal and also the smb://user:pass@server/share but does not work, i only get the error;


there was a problem connecting to <server name>

the server this file server will not allow any additional users to log on


connecting with 10.6 / xp / win7 via vpn is fine, it is just 10.7 lion with the problem (10.7 / 10.7.1 / 10.7.2)


i have tested this via mucomander and working ok, but dont really want to get users to use it they want to use the mounted drives on the desktop.

Nov 13, 2011 10:40 PM in response to Jagoan

I spent this entire weekend trying to figure this out. So, I tried what Jagoan did with creating a "user" account and it worked!! Amazing, after racking my brains about this and that simple suggestion was the answer I needed all along. At least it's a temporary fix for now until Apple can fix the bug.


I'm connecting Mac OS X v10.7.2 Lion to Windows XP pro sp3

Can't connect via SMB

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