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,
In my case, the SMB share I am accessing is hosted by a Linux box. The changes must be made on the server hosting the share you wish to access. Here are the steps I took:
- Using terminal, SSH into the Linux box.
- Type (without the quotes): "sudo vi /etc/avahi/services/samba.service"
- Arrow down until you get to the section of XML included in my post
- Press the letter i to enter insert mode
- Change <port>139</port> to <port>445</port>
- Press Esc to return to command mode
- Type :wq to write your changes and quit.
- Restart the avahi service using whatever method your Linux distro supports
- Exit the SSH session
- Mount your SMB share in Finder as before.
- Have a beer.
sudo -s vi /etc/host
arrow down to the 127.0.0.1 line
use shift a to append to that line
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.
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