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 7, 2011 3:43 AM in response to jan78

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

Aug 7, 2011 8:24 PM in response to upeace

I am facing the same/similar issue and was curious whether there is a solution.


My problem is NOT around accessing Lion from Win7, but accessing a Win7 share from Lion.


Funny enough it does work on initial start. However, it soon stops and then gives me the error message everyone in this thread is getting ("cannot connect to server..."). I can re-start my Win7 machine and then it works again (yes, this is not a typo, re-start of Win7 is required). But it only works for a few minutes. So, this is not a solution...


Maybe, one additional piece of information. The primary use of the Win7 server is file server and my itunes library sits there. Upon initial start, it pulls the songs from "automatically add to itunes" from Win7 machine into OSX Lion Itunes (technically the files got moved from one Win7 folder into another one).


This works, but then it stops working. Until I restart the Win7 machine...


Any thoughts?

Aug 8, 2011 5:47 PM in response to dazipser

Ok so i found a solution that works for me


My old url using applle+k was


smb://servername.domain.net/users/myfiles


this took me to the users folder and told me i did not have permissions to view it (which i don't and thats ok)


If you try

smb://myusername@servername.domain.net/users/myfiles

it works 🙂 almost, you have to use the sketchy icon view and can't use any other view. Obviously a bug!!!


it appears to be not taking in the user name from the key chain.


I was inspired by this article, enjoy.



Start article from OTHER source:

I just love posts like logs are your friend and a reference to the console.app That was a pretty worthless post. An offer to help analyze someones logs would have been better. The logs are definitely reporting errors, but there's not much to find regarding the errors.


I'm going to pretty much paste what I put in another post that was discussing this. I hope it helps some of people out. It's not pretty, but it has gotten me into all my servers and a number of SMB shares.


=========
Definitely issues with Apples new SMB implementation. I have managed to get SMB working and will try to explain what I think is happening.


As best as I can tell, when we try to map a SMB or CIFS share from the GUI, it appears to send the username and password of the logged in user. It appears to completely ignore any username you add to the url.


The ugly work around (Mount from the CLI)


Fortunately for us, there is the CLI method. You will need to open terminal for this.


First we need to make a place to mount the share to. When you first open terminal, it should place you in your home directory.


Lets make a folder called "data" by entering the following:


mkdir data


In my case, this will have created a folder in my home directory named "data". Now that we have a folder to mount the share to, lets get down to business. Below is the command used to mount a share. I'll explain it:


/sbin/mount_smbfs //myusername@myserver/share data


myusername is the username you need to connect with.
myserver is the server name or IP of the server you wish to connect to.
share is the share name you wish to connect to.
data is the folder you wish to mount this share to, in this case we created "data" as the mount point.


Give this a little time after hitting enter, it will prompt you in the terminal to enter your share's password. As you type, you will not see anything on the screen, but it is taking the password. Once you've completed entering your password it will mount to the folder you specified. You can access your files from in this folder, or if you have set Finder to show mounted shares on the desktop, you will see it on the desktop as well.


The only other odd thing here, is it does seem to have issues with then trying to mount another share from the same server with the same username. It has allowed me to mount other shares with another username on the same server. Really odd.
=========


Hopefully this will help until Apple starts releasing updates to Lion. (I'm hoping they won't leave this broken.)


Edit:
Just occured to me. If you are using Time Machine, you might want to exempt any mount points you create. I'm not sure if it won't try and back them up.


Message was edited by: Ryan Supeene

Aug 9, 2011 11:58 AM in response to upeace

so much work for a such trivial (should be) thing !!!! people, go back to snow, please.


I think I know the core of the problem. Maybe Steve has invited uncle Gates to collaborate on Lion's development. What about that?


All this labor work reminds me of my Windows age... long past now. I refuse to go back to it with Lion. What s the point of working on a Mac and need to type a lot of terminal lines and codes. There is no point at all !!!

Aug 10, 2011 5:45 AM in response to jan78

Time for some clarification. Please read them carefully before posting.


Solution1: Mounting a samba share in the finder from a linux server broadcasted via avahi.


The samba server itself on the linux machine works perfectly together with Lion. You can connect to the share in the finder via "Connect to server", but the connection doesn't work if the share is broadcasted via the zeroconf protokoll, shown under "Shared" in the finder (Zeroconf == Bonjour in the apple world == avahi in the linux world, see Wikipedia).


With Lion, Apple dropped the old "samba over netbios" protocol which runs on port 139 in favor for the new "direct connection" Microsoft introduced with Vista. The "direct connection" connect to port 445 instead of port 139. Samba currently handles both protocols. But most people configured the avahi daemon to announce the samba share only under port 139. The xml config files for the services which should be announced via avahi are on the linux machine (of course), mostly under /etc/avahi/services/ i.e /etc/avahi/services/samba.service shown in my posting above.


Solution2: Mounting a Lion Folder shared via "File Sharing" in the system preference on a linux machine

From a linux shell a smb share is mounted with the commando "mount.cifs" If the server is a mac running with Lion the additional options posted above are needed to mount it properly.



For both solutions it is absolutely not necessary to change something on you Mac. All the changes must be done on your linux machine. (Hope you have one :-)

Aug 12, 2011 7:10 PM in response to Skazzy

I have read this whole thread looking for an answer. There are some good ideas out there so keep it up. My problem arose with trying to get access to my shared folders from my Windows server.


When I installed Snow Leopard my shares to my windows server were working correctly, however after upgrading to Lion things did break. Looking around I finally figured out that something was wrong with the name resolution for my windows server on the Mac. My windows server would appear in the finder shared area but would never connect. Thinking it was something in the cache, I tried everything to flush, rebuild or clear it. That did not work, so taking some things I learned from building samba from scratch I thought there had to be a simple solution to this issue and I proceeded to add the hostname and ip of my windows server to my Lion hosts file. Now I can access all my shares. It is slower than usual and this my be because I am using a wireless connection, but it does work. YMMV


The only other thing I confirmed was to make sure on the Mac under System Preferences, Networking, Advanced that the WINS workgroup was equivalent to my existing windows workgroup name as setup on the Windows server.


Hope this helps, 🙂


Cheers


CJLomax

Aug 15, 2011 5:39 PM in response to Skazzy

Open terminal

sudo -s vi /etc/host

arrow down to the 127.0.0.1 line

use shift a to append to that line

hit return

type in your ip and hostname for the windows box (use tab not spaces)

hit escape and type wq! to save and exit.

ping the name you entered with the ip in the hosts file to check connectivity.



A quick update .. the smb is still broken ...also between to MacPro's I have to stop and start filesharing before they register.


Bummer! 😟


CJlomax

Aug 23, 2011 6:59 AM in response to upeace

If you connect via the command-K method, or via the command line 'mount' commands, the shares seem to work correctly when viewed on the command line...


Seems to suggest this is more a bug with Finder than with the samba client... Well, in my case anyway...


So if you are comfy usig the command line, you can mount the shares and then access them there easily 🙂


Best of luck

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.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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.