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