Skip navigation

Can't connect via SMB

149953 Views 131 Replies Latest reply: Mar 19, 2013 8:01 PM by ADT19104 RSS
  • jan78 Calculating status...
    Currently Being Moderated
    Aug 6, 2011 2:39 AM (in response to upeace)

    Solution found for the avahi problem!

     

    Just change the port in the samba.service from 139 to 445, see below

     

    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">

     

    <service-group>

        <name replace-wildcards="yes">%h</name>

        <service>

            <type>_smb._tcp</type>

            <port>445</port>

        </service>

        <service>

             <type>_device-info._tcp</type>

             <port>0</port>

             <txt-record>model=Xserve</txt-record>

        </service>

    </service-group>

     

    I've searched over days before i've found the solution FU APPLE!

    Just tell us and everything is ok, but changing without documentationi is NOT ok.

  • Mojo66 Level 1 Level 1 (50 points)
    Currently Being Moderated
    Aug 6, 2011 12:21 PM (in response to jan78)

    Thanks jan78, that solved my problem.

  • jan78 Level 1 Level 1 (0 points)
    Currently Being Moderated
    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

  • dazipser Calculating status...
    Currently Being Moderated
    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?

  • dazipser Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 8, 2011 6:45 AM (in response to jan78)

    Where would you make these changes? On the Windows or OSX machine? Would this still allow me to use a static IP address?

  • Ryan Supeene Calculating status...
    Currently Being Moderated
    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

  • Skazzy Level 1 Level 1 (45 points)
    Currently Being Moderated
    Aug 9, 2011 11:18 AM (in response to Ryan Supeene)

    This is crazy...I have the same issue and still no update yet!

  • Ryan Supeene Level 1 Level 1 (25 points)
    Currently Being Moderated
    Aug 9, 2011 11:38 AM (in response to Ryan Supeene)

    Ok use the mount command in the article that i attached and it "works"

    Its mounts the folder and an origional drive and its awesome.

    Down side is that short cuts and it automounting again is broken.  But if you setup some applescrips to mount your drive you shoudl be ok until an update is released.

  • Dbassi Calculating status...
    Currently Being Moderated
    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 !!!

  • Skazzy Level 1 Level 1 (45 points)
    Currently Being Moderated
    Aug 9, 2011 11:49 PM (in response to jan78)

    please help me out here..where do you change this setting Jan78??? on my MBP?  where?

  • D0GG Level 3 Level 3 (935 points)
    Currently Being Moderated
    Aug 9, 2011 11:55 PM (in response to upeace)

    One possible fix for you...

     

    I fixed my SMB share problem by connecting to the actual IP address rather than the GUI. Something to give a try.

  • Skazzy Level 1 Level 1 (45 points)
    Currently Being Moderated
    Aug 10, 2011 1:32 AM (in response to D0GG)

    This didn't work either DOGG...can someone walk me through how to do Jan78's solution?  how/where do you enter these commands in terminal???

  • jan78 Level 1 Level 1 (0 points)
    Currently Being Moderated
    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 :-)

  • Skazzy Level 1 Level 1 (45 points)
    Currently Being Moderated
    Aug 11, 2011 1:37 AM (in response to upeace)

    still frustrated..this didn't work for me. :-(

     

    I'm running:

    windows server 2003

    standard edition

    32bit

     

     

    Just out of curiosity..I recently encrypted my whole HD with Lion...would this have any effect by chance?

1 2 3 4 5 ... 9 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (7)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.