User Commands smbutil(1) NAME smbutil - SMB utility SYNOPSIS /usr/bin/smbutil login //[workgroup;]user[:password]@server /usr/bin/smbutil logout //[workgroup;][user[:password]@]server /usr/bin/smbutil logoutall /usr/bin/smbutil lookup name /usr/bin/smbutil status server /usr/bin/smbutil view //[workgroup;][user[:password]@]server /usr/bin/smbutil [-?v] DESCRIPTION The smbutil command is used to control the SMB client and issue various commands. Subcommands The smbutil command supports the following subcommands: login //[workgroup;]user[:password]@server Specify persistent password information to be used for an SMB server. When you specify this information, mounts can be done without a password prompt in non-Kerberos configurations. Note that Kerberos sites should use Ker- beros automatically and do not prompt for a password. If the resource includes a workgroup, you must escape the semicolon that appears after the workgroup name to prevent it from being interpreted by the command shell. For instance, surround the entire resource name with double quotes: smbutil view "//SALES;george@RSERVER". logout //[workgroup;][user[:password]@]server Erase the persistent password, password, that is stored by the smbutil login command so that user can no longer generate network activity. SunOS 5.11 Last change: May 15, 2007 1 User Commands smbutil(1) If the resource includes a workgroup, you must escape the semicolon that appears after the workgroup name to prevent it from being interpreted by the command shell. For instance, surround the entire resource name with double quotes: smbutil view "//SALES;george@RSERVER". logoutall Erase all the persistent passwords that are stored by the smbutil login command. lookup name Resolve the specified name to an IP address. Note - This subcommand is only supported for a server that uses CIFS over NetBIOS, not by a server that uses CIFS over plain TCP. status server Resolve the specified server to the NetBIOS workgroup and system name. server can be an IP address or a DNS name. If the resource includes a workgroup, you must escape the semicolon that appears after the workgroup name to prevent it from being interpreted by the command shell. For instance, surround the entire resource name with double quotes: smbutil view "//SALES;george@RSERVER". Note - This subcommand is only supported for a server that uses CIFS over NetBIOS, not by a server that uses CIFS over plain TCP. view //[workgroup;][user[:password]@]server List the resources available to user on the specified server. If the resource includes a workgroup, you must escape the semicolon that appears after the workgroup name to prevent it from being interpreted by the command shell. For instance, surround the entire resource name with double quotes: smbutil view "//SALES;george@RSERVER". SunOS 5.11 Last change: May 15, 2007 2 User Commands smbutil(1) OPTIONS The smbutil command supports the following global options: -? Print a short help message. -v Produce verbose output. EXAMPLES Example 1 Specifying a Password for a Share This example shows how to use the smbutil login command to specify the root user's password for the nano server. $ smbutil login //root@nano Password: Example 2 Erasing the Stored Password This example shows how to use the smbutil logout command to remove the root user's password on the nano server. $ smbutil logout //root@nano Example 3 Viewing Available Shares This example shows how to use the smbutil view command to see the available shares for user root on server nano. $ smbutil view //root@nano Password: Share Type Comment ------------------------------- netlogon disk Network Logon Service ipc$ pipe IPC Service (Samba Server) tmp disk Temporary file space public disk Public Stuff root disk Home Directories 5 shares listed from 5 available SunOS 5.11 Last change: May 15, 2007 3 User Commands smbutil(1) Example 4 Obtaining the IP Address From a Server Name This example shows how to use the smbutil lookup command to obtain the IP address of the nano server. $ smbutil lookup nano Got response from 192.168.168.210 IP address of nano: 192.168.168.210 Example 5 Obtaining the NetBIOS Workgroup and System Name o This example shows how to use the smbutil status command to obtain the NetBIOS workgroup and system name of the nano server. The server name, nano, is specified on the command line. $ smbutil status nano Workgroup: NANO Server: NANO o This example shows how to use the smbutil status command to obtain the NetBIOS workgroup and system name of the nano server. The IP address, 192.168.168.210, is specified on the command line. $ smbutil status 192.168.168.210 Workgroup: NANO Server: NANO FILES $HOME/.nsmbrc User-settable mount point configuration file to store the description for each connection. ATTRIBUTES See the attributes(5) man page for descriptions of the fol- lowing attributes: SunOS 5.11 Last change: May 15, 2007 4 User Commands smbutil(1) ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWsmbfscu | |_____________________________|_____________________________| | Interface Stability | Committed | |_____________________________|_____________________________| SEE ALSO mount_smbfs(1M), nsmbrc(4) NOTES This utility and man page were originally created by Boris Popov (bp@butya.kz, bp@FreeBSD.org). SunOS 5.11 Last change: May 15, 2007 5