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 available
If 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@vamana
You can also include the password after the username, using a colon (:) as a separator, to avoid being prompted for it:
% smbutil view //leonvs:leonspassword@vamana
Typing ...
Get Using Samba, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.