1smbutil(1) User Commands smbutil(1)
2
3
4
6 smbutil - Solaris CIFS client utility
7
9 /usr/bin/smbutil crypt
10
11
12 /usr/bin/smbutil login [-c] [[domain/]user]
13
14
15 /usr/bin/smbutil login [-c] [user[@domain]]
16
17
18 /usr/bin/smbutil logout [[domain/]user]
19
20
21 /usr/bin/smbutil logout [user[@domain]]
22
23
24 /usr/bin/smbutil logout -a
25
26
27 /usr/bin/smbutil logoutall
28
29
30 /usr/bin/smbutil lookup name
31
32
33 /usr/bin/smbutil status server
34
35
36 /usr/bin/smbutil view [-A | -U user] //[domain;][user[:password]@]server
37
38
39 /usr/bin/smbutil [-?dv]
40
41
43 The smbutil command controls the Solaris CIFS client and issues various
44 commands.
45
46 Subcommands
47 The smbutil command supports the following subcommands:
48
49 crypt
50
51 Creates a hash of a password. This subcommand prompts for a pass‐
52 word and writes the hash to standard output. This hash value is
53 suitable for use as a value for the password property in the
54 $HOME/.nsmbrc file.
55
56 The hashed password begins with two dollar signs ($$). If you
57 assign this hashed password to the password property in your
58 $HOME/.nsmbrc, be sure that you escape the special characters in
59 the password.
60
61 If you plan to store hashed passwords in your $HOME/.nsmbrc file,
62 ensure that the file permissions are set so that only the owner can
63 read or write the file (400 or 600), or the passwords are ignored.
64
65
66 login [-c] [ [[domain/]user] | [user[@domain] ]
67
68 Specifies persistent password information to be used for a CIFS
69 server user account. When you specify this information, mounts can
70 be done without a password prompt in non-Kerberos configurations.
71 Kerberos sites should use Kerberos automatically, not prompt for a
72 password. If a default domain is available in SMF or nsmbrc(4), the
73 domain can be omitted. If a user name is not specified, the Solaris
74 user account name is used.
75
76 Use the -c to check whether a persistent password is set for the
77 specified user.
78
79 Passwords can also be stored for a specific server by using a
80 server name in place of the domain name. This capability is useful
81 with servers that are configured for "workgroup mode."
82
83
84 logout [ [[domain/]user] | [user[@domain] ]
85
86 Erases the persistent passwords for the user running the command.
87
88 The user name and domain name portions of the name are optional. If
89 these names are not specified, the user name and domain name values
90 are taken from the properties set in your environment. See the nsm‐
91 brc(4) manual page.
92
93 If you stored your password for a specific server, specify the
94 server name in place of the domain name.
95
96
97 logout -a
98
99 Erases all of the persistent passwords that are stored for the user
100 who is running the command.
101
102
103 logoutall
104
105 Erases all the persistent passwords that are stored by all users
106 running the smbutil login command.
107
108 This command must be run as superuser.
109
110
111 lookup name
112
113 Resolves the specified name to an IP address.
114
115 This subcommand is only supported if an NBNS/WINS name server is
116 available.
117
118
119 status server
120
121 Resolves the specified server to the NetBIOS domain and system
122 name. server can be an IP address or a DNS name.
123
124
125 view [-A | -U user] //[domain;][user[:password]@]server
126
127 Lists the resources available to user on the specified server.
128
129 You can specify the -A option to view the resources as an anonymous
130 user or the -U user option to view the resources as the specified
131 user. These options are mutually exclusive.
132
133 If the resource includes a domain, you must escape the semicolon
134 that appears after the domain name to prevent it from being inter‐
135 preted by the command shell. For instance, surround the entire
136 resource name with single quotes: smbutil view
137 '//SALES;george@RSERVER'.
138
139
141 The following global options are supported:
142
143 -d Produces debugging output.
144
145
146 -v Produces verbose output.
147
148
149 -? Prints a short help message.
150
151
153 Example 1 Creating a Password Hash for the $HOME/.nsmbrc File
154
155
156 The following example shows how to use the smbutil crypt command to
157 create a hash of the password you specify. Then, you can use the hash
158 as the value for the $HOME/.nsmbrc file.
159
160
161
162 Be sure to escape the two dollar-sign prefix of the hashed password if
163 you store it as a value of the password property.
164
165
166 $ smbutil crypt
167 Password:
168 $$178465324253e0c07
169
170
171
172
173 The following $HOME/.nsmbrc file fragment shows how the password hash
174 value is set:
175
176
177 [RSERVER:george]
178 charsets=koi8-r:cp866
179 password='$$178465324253e0c07'
180
181
182
183 Example 2 Storing a Password for a CIFS Server
184
185
186 The following example shows how to use the smbutil login command to
187 store the root@example user's password.
188
189
190 $ smbutil login root@example
191 Password:
192
193
194
195 Example 3 Erasing the Stored Password
196
197
198 The following example shows how to use the smbutil logout command to
199 remove the root@example user's password.
200
201
202 $ smbutil logout root@example
203
204
205
206 Example 4 Viewing Available Shares
207
208
209 The following example shows how to use the smbutil view command to see
210 the available shares for user root on server example.
211
212
213 $ smbutil view //root@example
214 Password:
215 Share Type Comment
216 -------------------------------
217 netlogon disk Network Logon Service
218 ipc$ IPC IPC Service (Samba Server)
219 tmp disk Temporary file space
220 public disk Public Stuff
221 root disk Home Directories
222
223 5 shares listed from 5 available
224
225
226
227 Example 5 Viewing Available Shares as an Anonymous User
228
229
230 The following example shows how to use the smbutil view command to
231 anonymously view the available shares on the example server.
232
233
234 $ smbutil view -A //example
235 Share Type Comment
236 -------------------------------
237 netlogon disk Network Logon Service
238 ipc$ IPC IPC Service (Samba Server)
239 tmp disk Temporary file space
240 public disk Public Stuff
241 ethereal disk /export/ethereal
242 myshare disk Jan's stuff
243
244 6 shares listed from 6 available
245
246
247
248 Example 6 Obtaining the IP Address From a Server Name
249
250
251 The following example shows how to use the smbutil lookup command to
252 obtain the IP address of the example server.
253
254
255 $ smbutil lookup example
256 Got response from 192.168.168.210
257 IP address of example: 192.168.168.210
258
259
260
261 Example 7 Obtaining the NetBIOS Domain and System Name Using the Server
262 Name
263
264
265 The following example shows how to use the smbutil status command to
266 obtain the NetBIOS domain and system name of the example server. The
267 server name, example, is specified on the command line.
268
269
270 $ smbutil status example
271 Domain: WORKGROUP
272 Server: EXAMPLE
273
274
275
276 Example 8 Obtaining the NetBIOS Domain and System Name Using the IP
277 Address
278
279
280 The following example shows how to use the smbutil status command to
281 obtain the NetBIOS domain and system name of the example server. The IP
282 address, 192.168.168.210, is specified on the command line.
283
284
285 $ smbutil status 192.168.168.210
286 Domain: WORKGROUP
287 Server: EXAMPLE
288
289
290
292 $HOME/.nsmbrc
293
294 User-settable mount point configuration file to store the descrip‐
295 tion for each connection.
296
297
299 See attributes(5) for descriptions of the following attributes:
300
301
302
303
304 ┌─────────────────────────────┬─────────────────────────────┐
305 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
306 ├─────────────────────────────┼─────────────────────────────┤
307 │Availability │SUNWsmbfscu │
308 ├─────────────────────────────┼─────────────────────────────┤
309 │Interface Stability │See below. │
310 └─────────────────────────────┴─────────────────────────────┘
311
312
313 The output is Uncommitted. The rest of the interface is Committed.
314
316 mount_smbfs(1M), nsmbrc(4), attributes(5), smbfs(7FS)
317
319 This manual page contains material originally authored by Boris Popov,
320 bp@butya.kz, bp@FreeBSD.org.
321
323 The Solaris CIFS client always attempts to use gethostbyname() to
324 resolve host names. If the host name cannot be resolved, the CIFS
325 client uses NetBIOS name resolution (NBNS). By default, the Solaris
326 CIFS client permits the use of NBNS to enable Solaris CIFS clients in
327 Windows environments to work without additional configuration.
328
329
330 Since NBNS has been exploited in the past, you might want to disable
331 it. To disable NBNS, set the nbns-enabled service management facility
332 property to false. By default, nbns-enabled is set to true.
333
334
335
336SunOS 5.11 24 Jun 2009 smbutil(1)