Useful utilities for Windows networking

Oct 26, '01 01:09:41AM

Contributed by: junehao

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:

     [default]
workgroup=XSTUDIO
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!

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20011026010941459