I am trying to write a script that will mount a server and copy a file from that server. I've run into a small glitch, though. I can create a temporary directory and run the command to mount the server to that share and you can see it show up in the Finder window on the left Navigation side. But, when you click on that server name, the right side of the Finder window says its connecting and then connection failed. Any ideas of what is going on?


I'm using the following command to mount the server: Launch “/sbin/\mount” with params “-t smbfs //username:password@path/to/server/ /private/tmp/Share/ ”


Answer Summary:
0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


from apple's web site  if you have 10.7.4 it is a problem




Answered 06/18/2012 by: SMal.tmcc
Red Belt

  • It is 10.7.4 so that's a major problem.
  • we are in the same boat, also the version of firmware on our new i-macs does not play with using sudo bless over vlans anymore for k2000 imaging.
Please log in to comment



This first command lists the available shares at the destination IP:
$ smbclient -U user -I -L //smbshare/

Now you’ll want to pass set your SMB shares mount point:
$ mount -t smbfs -o username=winusername //smbserver/myshare /mnt/smbshare

and finally you’ll want to gain access to the SMB share by specifying your Windows login and the machines IP address:
$ mount -t cifs -o username=winusername,password=winpassword // /mnt/share

Answered 06/18/2012 by: SMal.tmcc
Red Belt

  • smbclient? there's no man page for this so is this a windows command?
    • http://www.samba.org/samba/docs/man/manpages-3/smbclient.1.html
      • Just found out that smbclient was removed in OS X.7 (Lion) and replaced with smbx. mount_smbfs is its replacement
  • This content is currently hidden from public view.
    Reason: Removed by user request
    For more information, visit our FAQ's.
Please log in to comment

I think I found part of the problem. Its the operating system, OS X.7, which can't mount smb shares as root. OS X.6.8 works fine. Now, how do i get it to mount in OS X.7?

Answered 06/18/2012 by: thefishyfew
Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity