Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A collection of tips on accessing Windows file servers Network
Windows servers use a Microsoft-proprietary network protocol called SMB to provide file services. Mac OS X 10.1 and later can act as a SMB client. There are five items of data that are crucial in the SMB world:
  • The server address � either a DNS name (server.xxyyy.company.com), an IP address, or (if you follow tip 8) a WINS name.
  • The share name � the name of the "share point" the the server is serving the files under.
  • Your user ID � your corporate Windows login ID.
  • Your Windows account domain � where your user ID "lives" in the Windows world.
  • (For tip 8) The Windows resource domain for workstations in your region -- a grouping of Windows machine names. In small-scale environments, the Windows account domain and resource domain might be the same.
Read the rest of the hint for the tips...

The nine tips:
Note: these tips are written assuming a corporate intranet environment, but they'll work anywhere.)
  1. Get Panther (Mac OS X v10.3) � earlier versions of Mac OS X have SMB functions, but Panther does it much better.

  2. When creating your Mac OS X account, set your "Short Name" to your corporate user ID in lower case. This can save you much typing later! (You can only set your short name when you create your Mac OS X account. If you already have something else, remember this tip for next time you set up a machine.)

  3. Use Finder's "Connect to Server" function with a "smb:" URL, rather than trying to browse to the server via the Network folder. Browsing is unwieldy and very slow in a large-scale corporate environment.

  4. When responding to the "SMB/CIFS Filesystem Authentication" box, CAREFULLY read all the values. They all look very similar and are easily mis-read. A very common stumbling point is the domain name � in some environments it defaults to something that's close, but not quite correct.

  5. Here's how to convert UNC names to "smb:" URLs: Add "smb:" to the front and flip all backslashes to forward slashes. Example: SERVERSHARE\Folder1\Folder2\File.dat becomes smb://SERVER/SHARE/Folder1/Folder2/File.dat

  6. Use the smb URL scheme knowledgeably.

    • Basic format: smb://server/share
    • List all shares on a server: smb://server
    • Specify an Windows domain and user ID: smb://domain;user@server/share

    This last format is the best format to use to add a share to your favorites or make an alias.

    Example: smb://DOMAIN;userid@server.xxyyy.company.com/SHARE � connect to the share (DNS name for server)
    Example: smb://DOMAIN;userid@server.xxyyy.company.com � list the shares
    Example: smb://DOMAIN;userid@SERVER/SHARE � connect to the share (WINS name for server)

  7. Use server favorites and aliases to save typing. (And use the smb://domain;user@server/share URL format for your favorites and aliases.)

  8. Set your Windows workgroup/resource domain and WINS server:

    1. Find out your Windows resource domain for workstations in your office and local WINS server address. (Ask your desktop computer support people.)
    2. Launch the "Directory Access" utility (in the /Applications/Utilities folder).
    3. Click the padlock icon in the lower left of the window and authenticate as an admin user.
    4. Select SMB, and press Configure.
    5. Set Workgroup to your Windows resource domain, and WINS server to your WINS server IP address, and press OK.
    6. Press Apply and wait for a few seconds.
    7. Restart your Mac.
  9. Advanced trick � use a ~/.nsmbrc file to get the Windows account domain to default correctly. Place a text file called .nsmbrc in your home folder with the following two lines. Change the "workgroup=" value to your Windows account domain.

    [default]
    workgroup=DOMAIN
    
Enjoy!

[robg adds: We've run versions of some of the above before as standalone hints, but this one really pulls it all together in one spot quite nicely...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[31,942 views]  

A collection of tips on accessing Windows file servers | 11 comments | Create New Account
Click here to return to the 'A collection of tips on accessing Windows file servers' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A collection of tips on accessing Windows file servers
Authored by: J^T on Jul 29, '04 03:32:09PM

The original article had its dashes and backslashes mangled during the editing process. Until robg gets a chance to fix the original post, here is the fixed version:

Windows servers use a Microsoft-proprietary network protocol called SMB to provide file services. Mac OS X 10.1 and later can act as a SMB client. There are five items of data that are crucial in the SMB world:
  • The server address -- either a DNS name (server.xxyyy.company.com), an IP address, or (if you follow tip 8) a WINS name.
  • The share name -- the name of the "share point" the the server is serving the files under.
  • Your user ID -- your corporate Windows login ID.
  • Your Windows account domain -- where your user ID "lives" in the Windows world.
  • (For tip 8) The Windows resource domain for workstations in your region -- a grouping of Windows machine names. In small-scale environments, the Windows account domain and resource domain might be the same.
Read the rest of the hint for the tips...

The nine tips:
Note: these tips are written assuming a corporate intranet environment, but they'll work anywhere.)
  1. Get Panther (Mac OS X v10.3) -- earlier versions of Mac OS X have SMB functions, but Panther does it much better.

  2. When creating your Mac OS X account, set your "Short Name" to your corporate user ID in lower case. This can save you much typing later! (You can only set your short name when you create your Mac OS X account. If you already have something else, remember this tip for next time you set up a machine.)

  3. Use Finder's "Connect to Server" function with a "smb:" URL, rather than trying to browse to the server via the Network folder. Browsing is unwieldy and very slow in a large-scale corporate environment.

  4. When responding to the "SMB/CIFS Filesystem Authentication" box, CAREFULLY read all the values. They all look very similar and are easily mis-read. A very common stumbling point is the domain name -- in some environments it defaults to something that's close, but not quite correct.

  5. Here's how to convert UNC names to "smb:" URLs: Add "smb:" to the front and flip all backslashes to forward slashes. Example: \SERVER\SHARE\Folder1\Folder2\File.dat becomes smb://SERVER/SHARE/Folder1/Folder2/File.dat

  6. Use the smb URL scheme knowledgeably.

    • Basic format: smb://server/share
    • List all shares on a server: smb://server
    • Specify an Windows domain and user ID: smb://domain;user@server/share

    This last format is the best format to use to add a share to your favorites or make an alias.

    Example: smb://DOMAIN;userid@server.xxyyy.company.com/SHARE -- connect to the share (DNS name for server)
    Example: smb://DOMAIN;userid@server.xxyyy.company.com -- list the shares
    Example: smb://DOMAIN;userid@SERVER/SHARE -- connect to the share (WINS name for server)

  7. Use server favorites and aliases to save typing. (And use the smb://domain;user@server/share URL format for your favorites and aliases.)

  8. Set your Windows workgroup/resource domain and WINS server:

    1. Find out your Windows resource domain for workstations in your office and local WINS server address. (Ask your desktop computer support people.)
    2. Launch the "Directory Access" utility (in the /Applications/Utilities folder).
    3. Click the padlock icon in the lower left of the window and authenticate as an admin user.
    4. Select SMB, and press Configure.
    5. Set Workgroup to your Windows resource domain, and WINS server to your WINS server IP address, and press OK.
    6. Press Apply and wait for a few seconds.
    7. Restart your Mac.
  9. Advanced trick -- use a ~/.nsmbrc file to get the Windows account domain to default correctly. Place a text file called .nsmbrc in your home folder with the following two lines. Change the "workgroup=" value to your Windows account domain.

    [default]
    workgroup=DOMAIN
    

Enjoy!
--J^T



[ Reply to This | # ]
A collection of tips on accessing Windows file servers
Authored by: osxfan57 on Oct 15, '04 11:01:53AM

I have no problem accessing Windows XP file servers. What I do have a problem with is browsing them in the Network sidebar in Finder (using 10.3.5) The only way I can connect to a shared Windows folder is command-K, which always works. The Network sidebar, however, only shows my own local server and ignores the Windows shared folders. Is there some other fix that will enable me to browse Windows folders from my Mac?

---
iMac 17, OS 10.3



[ Reply to This | # ]
A collection of tips on accessing Windows file servers
Authored by: drtofu on Apr 11, '06 09:42:05AM

Another tip is that if your windows user name has a space in it (like mine does), you can use the %20 encoding in the SMB url:

smb://user%20name:password@servername

I haven't gotten keychain to work with user%20name, however, so the password is plain to see in the SMB URL.



[ Reply to This | # ]
Keychain and SMB servers
Authored by: J^T on Jul 29, '04 03:44:19PM
By the way, if you use the full smb://domain;user@server/... syntax, the Mac OS X Keychain will work.

[ Reply to This | # ]
A collection of tips on accessing Windows file servers
Authored by: tjfarrell on Jul 29, '04 06:05:34PM

Thanks for this. I have two related questions.

First - what does tip 8 do for us? What do we lose by not doing it?

Second. I often get error messages such as

"The Finder cannot complete the operation because some data in
"smb://user@server" could not be read or written (Error code -36). "

Does anybody know if this error code is a mac error code or an error code from the server. If from the SMB server, where do I find the error code definitions.

Thanks.

---
--
T. Farrell



[ Reply to This | # ]
A collection of tips on accessing Windows file servers
Authored by: sapridyne on Jul 29, '04 09:06:27PM

Most likely the share name you are trying to access is longer than 12 characters. The 12 character limit is something that was supposedly fixed in SMB 3.0, but it seems to still be an issue. Check that out.



[ Reply to This | # ]
A collection of tips on accessing Windows file servers
Authored by: mael on Jul 30, '04 11:19:59AM
That usually happens when I try to reconnect to a share that I've been using with no troubles whatsoever before.
It turned out that the .DS_Store-files Mac OS X leaves lying around everywhere seem to cause this. Deleting them causes no harm but makes the share accessible again.

To do so, we are using a command that runs on the windows box, searching and deleting all .DS_Store-files. No need for a script here..

cd driveletter: like: cd f:
del /f /s .ds_store

Maybe it helps.

[ Reply to This | # ]

A collection of tips on accessing Windows file servers
Authored by: Fillman on Aug 05, '04 07:09:33PM

I'm guessing at the cause of this but I think it refers to multiple mount points for the shares. If you type in the ip address of the DNS server that you want to mount as opposed to the domain name you should get the list of shares succesfully each time.



[ Reply to This | # ]
A collection of tips on accessing Windows file servers
Authored by: intensity on Aug 09, '04 06:43:56PM

I ran into this problem today (code -36), and after 5 hours I was able to figure out what the problem was.

My w2k domain password had expired. This was problem #1. Loging into a windows machine I was able to successfully change the password. Trying to login again from my mac produced the same error, even though I could login into a different server in the same domain, which narrowed it down to something linking the two machines. Eventually I went into the Keychain manager and deleted all of the links for this server, and then I was able to successfully login.

Hope this helps!



[ Reply to This | # ]
M$ smb firewall ports
Authored by: FlaSheridn on Jul 30, '04 01:44:09PM

For the Windows end, see http://support.microsoft.com/?kbid=298804, "Internet firewalls can prevent browsing and file sharing".

• Microsoft file sharing SMB: User Datagram Protocol (UDP) ports from 135 through 139 and Transmission Control Protocol (TCP) ports from 135 through 139.
• Direct-hosted SMB traffic without a network basic input/output system (NetBIOS): port 445 (TCP and UPD).

Usual disclaimers apply; M$ seems to assume you won't turn your firewall on, and that if you do, you'll have to live with breaking stuff, rather than the compromise of running a firewall and opening ports.



[ Reply to This | # ]
Another possibility
Authored by: mcwelch16 on Oct 05, '04 05:31:33PM

I was just having immense trouble mounting a workgroup. I even checked just about every forum I could find and didn't find the answer that solved my problem. My persistence payed off, however and I discovered something that got my system working. In the Authentication for loggin onto a server it says "WORKGROUP/DOMAIN". By default, it was displaying my workgroup and nothing more. I added a '/' to the end of the workgroup (my domain is empty) and all of a sudden everythign was working perfectly.

To save myself the trouble of having to type the '/' every time, I modified my connect line to say "smb://WORKGROUP/;SERVER/SHARE"

I hope this will help save some people some time and frustration.



[ Reply to This | # ]