smbutil and mount_smbfs
The smbutil and mount_smbfs programs provide SMB client functionality for FreeBSD, Darwin, and Mac OS X. Neither of the programs is part of the Samba distribution; however, we are including them to give you a little additional support in case you have BSD-related Unix systems on your network.
smbutil
The smbutil program provides functionality similar to some of the Samba suite’s command-line utilities. It can be used to list the shares available on an SMB server or perform NetBIOS name lookups.
The first argument given to smbutil is one of a number of subcommands and is usually followed by arguments specific to the subcommand. For example, to list the resources offered by a server, use the view subcommand, and enter your server password when prompted:
% smbutil view //vamana
Password:
Share Type Comment
-------------------------------------------------------------
public disk
SS2500 printer Stylus Scan 2500
IPC$ pipe IPC Service (Samba 2.2.5)
ADMIN$ disk IPC Service (Samba 2.2.5)
leonvs disk User Home Directories
5 shares listed from 5 availableIf you wish to connect to the server with a username that differs
from that on your client, you can specify it on the command line by
preceding the name of the server with the username and using an at
sign (@) as a separator:
% smbutil view //leonvs@vamanaYou can also include the password after the username, using a colon (:) as a separator, to avoid being prompted for it:
% smbutil view //leonvs:leonspassword@vamanaTyping ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access