2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Right Reserved.
3 .\" Portions Copyright 1994-2008 The FreeBSD Project. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
5 .\" disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND
6 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
8 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9 .TH SMBUTIL 1 "Jun 24, 2009"
11 smbutil \- Solaris CIFS client utility
15 \fB/usr/bin/smbutil crypt\fR
20 \fB/usr/bin/smbutil login [-c] [[\fIdomain\fR/]\fIuser\fR]\fR
25 \fB/usr/bin/smbutil login [-c] [\fIuser\fR[@\fIdomain\fR]]\fR
30 \fB/usr/bin/smbutil logout [[\fIdomain\fR/]\fIuser\fR]\fR
35 \fB/usr/bin/smbutil logout [\fIuser\fR[@\fIdomain\fR]]\fR
40 \fB/usr/bin/smbutil logout -a\fR
45 \fB/usr/bin/smbutil logoutall\fR
50 \fB/usr/bin/smbutil lookup \fIname\fR\fR
55 \fB/usr/bin/smbutil status \fIserver\fR\fR
60 \fB/usr/bin/smbutil view [-A | -U \fIuser\fR] //[\fIdomain\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR\fR
65 \fB/usr/bin/smbutil [\fB-?dv\fR]\fR
71 The \fBsmbutil\fR command controls the Solaris CIFS client and issues various
76 The \fBsmbutil\fR command supports the following subcommands:
84 Creates a hash of a password. This subcommand prompts for a password and writes
85 the hash to standard output. This hash value is suitable for use as a value for
86 the \fBpassword\fR property in the \fB$HOME/.nsmbrc\fR file.
88 The hashed password begins with two dollar signs (\fB$$\fR). If you assign this
89 hashed password to the \fBpassword\fR property in your \fB$HOME/.nsmbrc\fR, be
90 sure that you escape the special characters in the password.
92 If you plan to store hashed passwords in your \fB$HOME/.nsmbrc\fR file, ensure
93 that the file permissions are set so that only the owner can read or write the
94 file (\fB400\fR or \fB600\fR), or the passwords are ignored.
100 \fB\fBlogin [-c] [ [[\fIdomain\fR/]\fIuser\fR] | [\fIuser\fR[@\fIdomain\fR]
105 Specifies persistent password information to be used for a CIFS server user
106 account. When you specify this information, mounts can be done without a
107 password prompt in non-Kerberos configurations. Kerberos sites should use
108 Kerberos automatically, not prompt for a password. If a default domain is
109 available in SMF or \fBnsmbrc\fR(4), the domain can be omitted. If a user name
110 is not specified, the Solaris user account name is used.
112 Use the \fB-c\fR to check whether a persistent password is set for the
115 Passwords can also be stored for a specific server by using a server name in
116 place of the domain name. This capability is useful with servers that are
117 configured for "workgroup mode."
123 \fB\fBlogout [ [[\fIdomain\fR/]\fIuser\fR] | [\fIuser\fR[@\fIdomain\fR] ]\fR\fR
127 Erases the persistent passwords for the user running the command.
129 The user name and domain name portions of the name are optional. If these names
130 are not specified, the user name and domain name values are taken from the
131 properties set in your environment. See the \fBnsmbrc\fR(4) manual page.
133 If you stored your password for a specific server, specify the server name in
134 place of the domain name.
140 \fB\fBlogout -a\fR\fR
144 Erases all of the persistent passwords that are stored for the user who is
151 \fB\fBlogoutall\fR\fR
155 Erases all the persistent passwords that are stored by all users running the
156 \fBsmbutil login\fR command.
158 This command must be run as superuser.
164 \fB\fBlookup \fIname\fR\fR\fR
168 Resolves the specified \fIname\fR to an IP address.
170 This subcommand is only supported if an NBNS/WINS name server is available.
176 \fB\fBstatus \fIserver\fR\fR\fR
180 Resolves the specified server to the NetBIOS domain and system name.
181 \fIserver\fR can be an IP address or a DNS name.
187 \fB\fBview [-A | -U \fIuser\fR]
188 //[\fIdomain\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR\fR\fR
192 Lists the resources available to \fIuser\fR on the specified \fIserver\fR.
194 You can specify the \fB-A\fR option to view the resources as an anonymous user
195 or the \fB-U\fR \fIuser\fR option to view the resources as the specified user.
196 These options are mutually exclusive.
198 If the resource includes a domain, you must escape the semicolon that appears
199 after the domain name to prevent it from being interpreted by the command
200 shell. For instance, surround the entire resource name with single quotes:
201 \fBsmbutil view '//SALES;george@RSERVER'\fR.
207 The following global options are supported:
214 Produces debugging output.
223 Produces verbose output.
232 Prints a short help message.
237 \fBExample 1 \fRCreating a Password Hash for the \fB$HOME/.nsmbrc\fR File
240 The following example shows how to use the \fBsmbutil crypt\fR command to
241 create a hash of the password you specify. Then, you can use the hash as the
242 value for the \fB$HOME/.nsmbrc\fR file.
246 Be sure to escape the two dollar-sign prefix of the hashed password if you
247 store it as a value of the \fBpassword\fR property.
252 $ \fBsmbutil crypt\fR
261 The following \fB$HOME/.nsmbrc\fR file fragment shows how the password hash
268 charsets=koi8-r:cp866
269 password='$$178465324253e0c07'
275 \fBExample 2 \fRStoring a Password for a CIFS Server
278 The following example shows how to use the \fBsmbutil login\fR command to store
279 the \fBroot@example\fR user's password.
284 $ \fBsmbutil login root@example\fR
291 \fBExample 3 \fRErasing the Stored Password
294 The following example shows how to use the \fBsmbutil logout\fR command to
295 remove the \fBroot@example\fR user's password.
300 $ \fBsmbutil logout root@example\fR
306 \fBExample 4 \fRViewing Available Shares
309 The following example shows how to use the \fBsmbutil view\fR command to see
310 the available shares for user \fBroot\fR on server \fBexample\fR.
315 $ \fBsmbutil view //root@example\fR
318 -------------------------------
319 netlogon disk Network Logon Service
320 ipc$ IPC IPC Service (Samba Server)
321 tmp disk Temporary file space
322 public disk Public Stuff
323 root disk Home Directories
325 5 shares listed from 5 available
331 \fBExample 5 \fRViewing Available Shares as an Anonymous User
334 The following example shows how to use the \fBsmbutil view\fR command to
335 anonymously view the available shares on the \fBexample\fR server.
340 $ \fBsmbutil view -A //example\fR
342 -------------------------------
343 netlogon disk Network Logon Service
344 ipc$ IPC IPC Service (Samba Server)
345 tmp disk Temporary file space
346 public disk Public Stuff
347 ethereal disk /export/ethereal
348 myshare disk Jan's stuff
350 6 shares listed from 6 available
356 \fBExample 6 \fRObtaining the IP Address From a Server Name
359 The following example shows how to use the \fBsmbutil lookup\fR command to
360 obtain the IP address of the \fBexample\fR server.
365 $ \fBsmbutil lookup example\fR
366 Got response from 192.168.168.210
367 IP address of example: 192.168.168.210
373 \fBExample 7 \fRObtaining the NetBIOS Domain and System Name Using the Server
377 The following example shows how to use the \fBsmbutil status\fR command to
378 obtain the NetBIOS domain and system name of the \fBexample\fR server. The
379 server name, \fBexample\fR, is specified on the command line.
384 $ \fBsmbutil status example\fR
392 \fBExample 8 \fRObtaining the NetBIOS Domain and System Name Using the IP
396 The following example shows how to use the \fBsmbutil status\fR command to
397 obtain the NetBIOS domain and system name of the \fBexample\fR server. The IP
398 address, \fB192.168.168.210\fR, is specified on the command line.
403 $ \fBsmbutil status 192.168.168.210\fR
414 \fB\fB$HOME/.nsmbrc\fR\fR
418 User-settable mount point configuration file to store the description for each
425 See \fBattributes\fR(5) for descriptions of the following attributes:
433 ATTRIBUTE TYPE ATTRIBUTE VALUE
435 Interface Stability See below.
440 The output is Uncommitted. The rest of the interface is Committed.
444 \fBmount_smbfs\fR(1M), \fBnsmbrc\fR(4), \fBattributes\fR(5), \fBsmbfs\fR(7FS)
448 This manual page contains material originally authored by Boris Popov,
449 \fBbp@butya.kz\fR, \fBbp@FreeBSD.org\fR.
453 The Solaris CIFS client always attempts to use \fBgethostbyname()\fR to resolve
454 host names. If the host name cannot be resolved, the CIFS client uses NetBIOS
455 name resolution (NBNS). By default, the Solaris CIFS client permits the use of
456 NBNS to enable Solaris CIFS clients in Windows environments to work without
457 additional configuration.
460 Since NBNS has been exploited in the past, you might want to disable it. To
461 disable NBNS, set the \fBnbns-enabled\fR service management facility property
462 to \fBfalse\fR. By default, \fBnbns-enabled\fR is set to \fBtrue\fR.