Add early prototype of cifs mount helper for Linux
[Samba/gebeck_regimport.git] / docs / htmldocs / smbsh.1.html
blobc8c61fb6fe96ac82eb25a624a1d52c44de83d3d8
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >smbsh</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77+"></HEAD
9 ><BODY
10 CLASS="REFENTRY"
11 BGCOLOR="#FFFFFF"
12 TEXT="#000000"
13 LINK="#0000FF"
14 VLINK="#840084"
15 ALINK="#0000FF"
16 ><H1
17 ><A
18 NAME="SMBSH.1"
19 ></A
20 >smbsh</H1
21 ><DIV
22 CLASS="REFNAMEDIV"
23 ><A
24 NAME="AEN5"
25 ></A
26 ><H2
27 >Name</H2
28 >smbsh&nbsp;--&nbsp;Allows access to Windows NT filesystem
29 using UNIX commands</DIV
30 ><DIV
31 CLASS="REFSYNOPSISDIV"
32 ><A
33 NAME="AEN8"
34 ></A
35 ><H2
36 >Synopsis</H2
37 ><P
38 ><B
39 CLASS="COMMAND"
40 >smbsh</B
41 > [-W workgroup] [-U username] [-P prefix] [-R &lt;name resolve order&gt;] [-d &lt;debug level&gt;] [-l logfile] [-L libdir]</P
42 ></DIV
43 ><DIV
44 CLASS="REFSECT1"
45 ><A
46 NAME="AEN18"
47 ></A
48 ><H2
49 >DESCRIPTION</H2
50 ><P
51 >This tool is part of the <SPAN
52 CLASS="CITEREFENTRY"
53 ><SPAN
54 CLASS="REFENTRYTITLE"
55 >Samba</SPAN
56 >(7)</SPAN
57 > suite.</P
58 ><P
59 ><B
60 CLASS="COMMAND"
61 >smbsh</B
62 > allows you to access an NT filesystem
63 using UNIX commands such as <B
64 CLASS="COMMAND"
65 >ls</B
66 >, <B
67 CLASS="COMMAND"
68 > egrep</B
69 >, and <B
70 CLASS="COMMAND"
71 >rcp</B
72 >. You must use a
73 shell that is dynamically linked in order for <B
74 CLASS="COMMAND"
75 >smbsh</B
77 to work correctly.</P
78 ></DIV
79 ><DIV
80 CLASS="REFSECT1"
81 ><A
82 NAME="AEN30"
83 ></A
84 ><H2
85 >OPTIONS</H2
86 ><P
87 ></P
88 ><DIV
89 CLASS="VARIABLELIST"
90 ><DL
91 ><DT
92 >-W WORKGROUP</DT
93 ><DD
94 ><P
95 >Override the default workgroup specified in the
96 workgroup parameter of the <SPAN
97 CLASS="CITEREFENTRY"
98 ><SPAN
99 CLASS="REFENTRYTITLE"
100 >smb.conf</SPAN
101 >(5)</SPAN
102 > file
103 for this session. This may be needed to connect to some
104 servers. </P
105 ></DD
106 ><DT
107 >-U username[%pass]</DT
108 ><DD
110 >Sets the SMB username or username and password.
111 If this option is not specified, the user will be prompted for
112 both the username and the password. If %pass is not specified,
113 the user will be prompted for the password.
115 ></DD
116 ><DT
117 >-P prefix</DT
118 ><DD
120 >This option allows
121 the user to set the directory prefix for SMB access. The
122 default value if this option is not specified is
123 <SPAN
124 CLASS="emphasis"
126 CLASS="EMPHASIS"
127 >smb</I
128 ></SPAN
131 ></DD
132 ><DT
133 >-R &lt;name resolve order&gt;</DT
134 ><DD
136 >This option is used to determine what naming
137 services and in what order to resolve
138 host names to IP addresses. The option takes a space-separated
139 string of different name resolution options.</P
141 >The options are: "lmhosts", "host", "wins" and "bcast".
142 They cause names to be resolved as follows :</P
144 ></P
145 ><UL
146 ><LI
148 ><TT
149 CLASS="CONSTANT"
150 >lmhosts</TT
152 Lookup an IP address in the Samba lmhosts file. If the
153 line in lmhosts has no name type attached to the
154 NetBIOS name
155 (see the <SPAN
156 CLASS="CITEREFENTRY"
157 ><SPAN
158 CLASS="REFENTRYTITLE"
159 >lmhosts</SPAN
160 >(5)</SPAN
161 > for details)
162 then any name type matches for lookup.
164 ></LI
165 ><LI
167 ><TT
168 CLASS="CONSTANT"
169 >host</TT
171 Do a standard host name to IP address resolution, using
172 the system <TT
173 CLASS="FILENAME"
174 >/etc/hosts</TT
175 >, NIS, or DNS
176 lookups. This method of name resolution is operating
177 system dependent, for instance on IRIX or Solaris this
178 may be controlled by the <TT
179 CLASS="FILENAME"
180 >/etc/nsswitch.conf
181 </TT
182 > file). Note that this method is only used
183 if the NetBIOS name type being queried is the 0x20
184 (server) name type, otherwise it is ignored.
186 ></LI
187 ><LI
189 ><TT
190 CLASS="CONSTANT"
191 >wins</TT
193 Query a name with the IP address listed in the
195 CLASS="PARAMETER"
197 >wins server</I
198 ></TT
199 > parameter. If no
200 WINS server has been specified this method will be
201 ignored.
203 ></LI
204 ><LI
206 ><TT
207 CLASS="CONSTANT"
208 >bcast</TT
210 Do a broadcast on each of the known local interfaces
211 listed in the <TT
212 CLASS="PARAMETER"
214 >interfaces</I
215 ></TT
217 parameter. This is the least reliable of the name
218 resolution methods as it depends on the target host
219 being on a locally connected subnet.
221 ></LI
222 ></UL
224 >If this parameter is not set then the name resolve order
225 defined in the <SPAN
226 CLASS="CITEREFENTRY"
227 ><SPAN
228 CLASS="REFENTRYTITLE"
229 >smb.conf</SPAN
230 >(5)</SPAN
231 > file parameter
232 (<TT
233 CLASS="PARAMETER"
235 >name resolve order</I
236 ></TT
237 >) will be used. </P
239 >The default order is lmhosts, host, wins, bcast. Without
240 this parameter or any entry in the <TT
241 CLASS="PARAMETER"
243 >name resolve order
245 ></TT
246 > parameter of the <SPAN
247 CLASS="CITEREFENTRY"
248 ><SPAN
249 CLASS="REFENTRYTITLE"
250 >smb.conf</SPAN
251 >(5)</SPAN
252 > file, the name resolution methods
253 will be attempted in this order. </P
254 ></DD
255 ><DT
256 >-d &lt;debug level&gt;</DT
257 ><DD
259 >debug level is an integer from 0 to 10.</P
261 >The default value if this parameter is not specified
262 is zero.</P
264 >The higher this value, the more detail will be logged
265 about the activities of <SPAN
266 CLASS="CITEREFENTRY"
267 ><SPAN
268 CLASS="REFENTRYTITLE"
269 >nmblookup</SPAN
270 >(1)</SPAN
271 >. At level
272 0, only critical errors and serious warnings will be logged.
274 ></DD
275 ><DT
276 >-l logfilename</DT
277 ><DD
279 >If specified causes all debug messages to be
280 written to the file specified by <TT
281 CLASS="REPLACEABLE"
283 >logfilename
285 ></TT
286 >. If not specified then all messages will be
287 written to<TT
288 CLASS="REPLACEABLE"
290 >stderr</I
291 ></TT
294 ></DD
295 ><DT
296 >-L libdir</DT
297 ><DD
299 >This parameter specifies the location of the
300 shared libraries used by <B
301 CLASS="COMMAND"
302 >smbsh</B
303 >. The default
304 value is specified at compile time.
306 ></DD
307 ></DL
308 ></DIV
309 ></DIV
310 ><DIV
311 CLASS="REFSECT1"
313 NAME="AEN104"
314 ></A
315 ><H2
316 >EXAMPLES</H2
318 >To use the <B
319 CLASS="COMMAND"
320 >smbsh</B
321 > command, execute <B
322 CLASS="COMMAND"
323 > smbsh</B
324 > from the prompt and enter the username and password
325 that authenticates you to the machine running the Windows NT
326 operating system.
327 <PRE
328 CLASS="PROGRAMLISTING"
329 ><TT
330 CLASS="PROMPT"
331 >system% </TT
332 ><TT
333 CLASS="USERINPUT"
335 >smbsh</B
336 ></TT
339 CLASS="PROMPT"
340 >Username: </TT
341 ><TT
342 CLASS="USERINPUT"
344 >user</B
345 ></TT
348 CLASS="PROMPT"
349 >Password: </TT
350 ><TT
351 CLASS="USERINPUT"
353 >XXXXXXX</B
354 ></TT
355 ></PRE
356 ></P
358 >Any dynamically linked command you execute from
359 this shell will access the <TT
360 CLASS="FILENAME"
361 >/smb</TT
362 > directory
363 using the smb protocol. For example, the command <B
364 CLASS="COMMAND"
365 >ls /smb
367 > will show a list of workgroups. The command
369 CLASS="COMMAND"
370 >ls /smb/MYGROUP </B
371 > will show all the machines in
372 the workgroup MYGROUP. The command
374 CLASS="COMMAND"
375 >ls /smb/MYGROUP/&lt;machine-name&gt;</B
376 > will show the share
377 names for that machine. You could then, for example, use the <B
378 CLASS="COMMAND"
379 > cd</B
380 > command to change directories, <B
381 CLASS="COMMAND"
382 >vi</B
383 > to
384 edit files, and <B
385 CLASS="COMMAND"
386 >rcp</B
387 > to copy files.</P
388 ></DIV
389 ><DIV
390 CLASS="REFSECT1"
392 NAME="AEN124"
393 ></A
394 ><H2
395 >VERSION</H2
397 >This man page is correct for version 3.0 of the Samba suite.</P
398 ></DIV
399 ><DIV
400 CLASS="REFSECT1"
402 NAME="AEN127"
403 ></A
404 ><H2
405 >BUGS</H2
408 CLASS="COMMAND"
409 >smbsh</B
410 > works by intercepting the standard
411 libc calls with the dynamically loaded versions in <TT
412 CLASS="FILENAME"
413 > smbwrapper.o</TT
414 >. Not all calls have been "wrapped", so
415 some programs may not function correctly under <B
416 CLASS="COMMAND"
417 >smbsh
419 >.</P
421 >Programs which are not dynamically linked cannot make
422 use of <B
423 CLASS="COMMAND"
424 >smbsh</B
425 >'s functionality. Most versions
426 of UNIX have a <B
427 CLASS="COMMAND"
428 >file</B
429 > command that will
430 describe how a program was linked.</P
431 ></DIV
432 ><DIV
433 CLASS="REFSECT1"
435 NAME="AEN136"
436 ></A
437 ><H2
438 >SEE ALSO</H2
440 ><SPAN
441 CLASS="CITEREFENTRY"
442 ><SPAN
443 CLASS="REFENTRYTITLE"
444 >smbd</SPAN
445 >(8)</SPAN
446 >, <SPAN
447 CLASS="CITEREFENTRY"
448 ><SPAN
449 CLASS="REFENTRYTITLE"
450 >smb.conf</SPAN
451 >(5)</SPAN
452 ></P
453 ></DIV
454 ><DIV
455 CLASS="REFSECT1"
457 NAME="AEN145"
458 ></A
459 ><H2
460 >AUTHOR</H2
462 >The original Samba software and related utilities
463 were created by Andrew Tridgell. Samba is now developed
464 by the Samba Team as an Open Source project similar
465 to the way the Linux kernel is developed.</P
467 >The original Samba man pages were written by Karl Auer.
468 The man page sources were converted to YODL format (another
469 excellent piece of Open Source software, available at <A
470 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
471 TARGET="_top"
472 > ftp://ftp.icce.rug.nl/pub/unix/</A
473 >) and updated for the Samba 2.0
474 release by Jeremy Allison. The conversion to DocBook for
475 Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2
476 for Samba 3.0 was done by Alexander Bokovoy.</P
477 ></DIV
478 ></BODY
479 ></HTML