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

Useful utilities for Windows networking Network
Mac OS 10.1 with Samba built-in is a life saver. But without 3rd party CIFS clients, such as Sharity, I can't browse the resoruces on Windows servers. I have Sharity student license but have found it's inconvenient when dealing with many Windows servers -- only 2 connections allowed at a time. In order to check the resource on the third server I have to get into Sharity and disconnect one of the logged in servers. A few days ago I found something interesting: .nsmbrc and smbutil.

.nsmbrc is the configuration file for the Samba connections. The personal configuration file is in your home directory ~/.nsmbrc (don't forget the dot), and the global configuration file is at /usr/local/etc/nsmb.conf. For example, you can have this in your personal .nsmbrc file:
Now when you connect to a Windows server via Finder's Connect to Server command, the Workgroup field in the login panel is automatically filled in. Settings in .nsmbrc can also be used by smbutil.

smbutil is an interface to SMB requester. It has many functions for Samba file systems and logging in/out to the Windows server. However, the ability to browse Windows resource is the most useful one.
    % sudo smbutil view //Account_Name@Server_Name
You'll be asked for your local password, then your windows password. For servers in different workgroup, use this:
    % sudo smbutil view -W Workgroup_Name //Account_Name@Server_Name
I still can't figure out why smbutil only allows administrators to view resources. If you execute smbutil without sudo, you'll simply get an error. Please refer to the man pages of smbutil and mount_smbfs for more information.

Now I just want a GUI for smbutil!
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)

Useful utilities for Windows networking | 12 comments | Create New Account
Click here to return to the 'Useful utilities for Windows networking' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Can't set locale
Authored by: shacker on Oct 26, '01 03:07:35PM

I have not been able to connect to an SMB share on a local Linux host, no matter what I do. The share does not require a username/password - just verifies on IP triplets. But the Connect to Server dialog won't let you continue without a user/pass. That's problem one.

Utilities such as smbutil and mount_smbfs always give the same error:

"Can't set locale ''

a bug somewhere in the nb_name* code "

I have set the linux host's hostname in NetInfo as described in apple knowledgebase article 88158. Any other suggestions before I resort to 3rd party SMB utilities?

[ Reply to This | # ]
Can't set locale
Authored by: shacker on Oct 26, '01 03:35:18PM

Finally grabbed sharity, and it mounted my linux-hosted SMB share perfectly the first time. Have been wrestling with Apple's SMB client for days, have tried everything, got nowhere. Sharity is a gem. Thanks for the pointer.

[ Reply to This | # ]
Can't set locale
Authored by: davetaflin on May 29, '03 11:57:57PM

Try unsetting the LANG environment variable:

% unsetenv LANG
% mount_smbfs...

[ Reply to This | # ]
Oops. Incorrect URL.
Authored by: junehao on Oct 26, '01 05:40:01PM
The URL of Sharity should be: Sorry!

[ Reply to This | # ]
why do you need sharity?
Authored by: frigaut on Oct 26, '01 11:45:28PM

Hi ,

I don't get it. Why do you need sharity ? I did not install neither sharity
nor dave. But I can connect to a windows or unix server and I have
access to all the file in the share thru the regular finder. What am I
missing here ? Do you want additionnal functionalities ?
The only thing I am missing is that I did not find any options to
reconnect automaticaly at login on the network. Each time I have to
reconnect manually. Hints on that ?

[ Reply to This | # ]
why do you need sharity?
Authored by: junehao on Oct 27, '01 01:11:50AM

Because you cannot just use smb://server, you have to indicate the share explicitely like smb://server/share. In my working environment we have 20+ Windows NT/2000 servers and each one has a whole bunch of shares. Without using Sharity I have to go to one of the Windows machine to check which resource I am going to connect because I can't remember all of them. Well of course that's not a problem for those who has only one Windows server and a few shares. :-)

[ Reply to This | # ]
why do you need sharity?
Authored by: jeremyp on Dec 18, '01 09:10:14AM

Thank you. That is the single most useful thing I've read since installing Mac OSX.1. I've been trying to figure out how to do windows shares since then, and it turns out all I needed was the actual share name as well as the machine name.

[ Reply to This | # ]
why do you need sharity?
Authored by: shacker on Oct 27, '01 01:55:51AM

Based on my reading through newsgroups, macslash, this site, and certainly from my own experience over the past week, it seems that OSX.1's SMB mounting facilities (from Connect to Server or using mount_smbfs and/or smbutil from the command line, and even after adding the remote machine's hostname to NetInfo per Apple Knowledge Base article 88158), work only for some networks and under some situations. Exactly what circumstances it works under I haven't yet determined, but I know that my linux-hosted SMB share is a dirt simple, no-password-required share, and that OSX.1 absolutely refuses to see it under any circumstances (Win machines on the same network see it fine).

For those of us in this (still mysterious) situation, Sharity is the only solution, and it works like a charm.

[ Reply to This | # ]
server shares with a space in them?
Authored by: sphen on Nov 01, '01 08:15:15PM
how does one mount a share on a smb server if its name has a space in it?

for example:
if the computer is zion and share is new music, i can get files in terminal by typing smbclient //zion/"new music", but i havent found a way to do it in the finder. I have tried a whole bunch of things but cant get past the space. any help?


[ Reply to This | # ]
server shares with a space in them?
Authored by: sammysheep on Apr 22, '02 08:43:06PM
In mac os x as well as other Unixes, the escape character is the \
Therefore, when referencing a file with spaces, use "\ "
For example, suppose you had a folder on your desktop for user guest called "My Folder", the absolute path would be:

/Users/guest/Desktop/My\ Folder/

[ Reply to This | # ]
server shares with a space in them?
Authored by: horvatic on Oct 25, '02 05:04:10PM

According to AppleCare Knowledge base you can't type a space but you can use %20 which will
act like a space.

Article ID: 106471

I hope this is what you were asking about.


[ Reply to This | # ]
smbutil GUI
Authored by: Schep on Dec 31, '01 01:59:49PM

Go to
SSCT is a Gui Util for Samba

[ Reply to This | # ]