This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[kai/samba.git] / docs / htmldocs / smbsh.1.html
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"
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 <A
52 HREF="samba.7.html"
53 TARGET="_top"
54 >       Samba</A
55 > suite.</P
56 ><P
57 ><B
58 CLASS="COMMAND"
59 >smbsh</B
60 > allows you to access an NT filesystem 
61         using UNIX commands such as <B
62 CLASS="COMMAND"
63 >ls</B
64 >, <B
65 CLASS="COMMAND"
66 >       egrep</B
67 >, and <B
68 CLASS="COMMAND"
69 >rcp</B
70 >. You must use a 
71         shell that is dynamically linked in order for <B
72 CLASS="COMMAND"
73 >smbsh</B
74
75         to work correctly.</P
76 ></DIV
77 ><DIV
78 CLASS="REFSECT1"
79 ><A
80 NAME="AEN28"
81 ></A
82 ><H2
83 >OPTIONS</H2
84 ><P
85 ></P
86 ><DIV
87 CLASS="VARIABLELIST"
88 ><DL
89 ><DT
90 >-W WORKGROUP</DT
91 ><DD
92 ><P
93 >Override the default workgroup specified in the 
94                 workgroup parameter of the <TT
95 CLASS="FILENAME"
96 >smb.conf</TT
97 > file 
98                 for this session. This may be needed to connect to some 
99                 servers. </P
100 ></DD
101 ><DT
102 >-U username[%pass]</DT
103 ><DD
104 ><P
105 >Sets the SMB username or username and password.
106                 If this option is not specified, the user will be prompted for 
107                 both the username and the password.  If %pass is not specified, 
108                 the user will be prompted for the password.
109                 </P
110 ></DD
111 ><DT
112 >-P prefix</DT
113 ><DD
114 ><P
115 >This option allows
116                 the user to set the directory prefix for SMB access. The 
117                 default value if this option is not specified is 
118                 <SPAN
119 CLASS="emphasis"
120 ><I
121 CLASS="EMPHASIS"
122 >smb</I
123 ></SPAN
124 >.
125                 </P
126 ></DD
127 ><DT
128 >-R &lt;name resolve order&gt;</DT
129 ><DD
130 ><P
131 >This option is used to determine what naming 
132                 services and in what order to resolve 
133                 host names to IP addresses. The option takes a space-separated 
134                 string of different name resolution options.</P
135 ><P
136 >The options are :"lmhosts", "host", "wins" and "bcast". 
137                 They cause names to be resolved as follows :</P
138 ><P
139 ></P
140 ><UL
141 ><LI
142 ><P
143 ><TT
144 CLASS="CONSTANT"
145 >lmhosts</TT
146 > : 
147                         Lookup an IP address in the Samba lmhosts file. If the 
148                         line in lmhosts has no name type attached to the 
149                         NetBIOS name 
150                         (see the <A
151 HREF="lmhosts.5.html"
152 TARGET="_top"
153 >lmhosts(5)</A
154 >
155                         for details) then any name type matches for lookup.
156                         </P
157 ></LI
158 ><LI
159 ><P
160 ><TT
161 CLASS="CONSTANT"
162 >host</TT
163 > : 
164                         Do a standard host name to IP address resolution, using
165                         the system <TT
166 CLASS="FILENAME"
167 >/etc/hosts</TT
168 >, NIS, or DNS
169                         lookups. This method of name resolution is operating 
170                         system dependent, for instance on IRIX or Solaris this 
171                         may be controlled by the <TT
172 CLASS="FILENAME"
173 >/etc/nsswitch.conf
174                         </TT
175 > file).  Note that this method is only used 
176                         if the NetBIOS name type being queried is the 0x20 
177                         (server) name type, otherwise it is ignored.
178                         </P
179 ></LI
180 ><LI
181 ><P
182 ><TT
183 CLASS="CONSTANT"
184 >wins</TT
185 > : 
186                         Query a name with the IP address listed in the 
187                         <TT
188 CLASS="PARAMETER"
189 ><I
190 >wins server</I
191 ></TT
192 > parameter.  If no 
193                         WINS server has been specified this method will be 
194                         ignored.
195                         </P
196 ></LI
197 ><LI
198 ><P
199 ><TT
200 CLASS="CONSTANT"
201 >bcast</TT
202 > : 
203                         Do a broadcast on each of the known local interfaces 
204                         listed in the <TT
205 CLASS="PARAMETER"
206 ><I
207 >interfaces</I
208 ></TT
209 >
210                         parameter. This is the least reliable of the name 
211                         resolution methods as it depends on the target host 
212                         being on a locally connected subnet.
213                         </P
214 ></LI
215 ></UL
216 ><P
217 >If this parameter is not set then the name resolve order 
218                 defined in the <TT
219 CLASS="FILENAME"
220 >smb.conf</TT
221 > file parameter  
222                 (name resolve order) will be used. </P
223 ><P
224 >The default order is lmhosts, host, wins, bcast. Without 
225                 this parameter or any entry in the <TT
226 CLASS="PARAMETER"
227 ><I
228 >name resolve order
229                 </I
230 ></TT
231 > parameter of the <TT
232 CLASS="FILENAME"
233 >smb.conf</TT
234
235                 file, the name resolution methods will be attempted in this 
236                 order. </P
237 ></DD
238 ><DT
239 >-d &lt;debug level&gt;</DT
240 ><DD
241 ><P
242 >debug level is an integer from 0 to 10.</P
243 ><P
244 >The default value if this parameter is not specified
245                 is zero.</P
246 ><P
247 >The higher this value, the more detail will be logged
248                 about the activities of <B
249 CLASS="COMMAND"
250 >nmblookup</B
251 >. At level
252                 0, only critical errors and serious warnings will be logged.
253                 </P
254 ></DD
255 ><DT
256 >-l logfilename</DT
257 ><DD
258 ><P
259 >If specified causes all debug messages to be
260                 written to the file specified by <TT
261 CLASS="REPLACEABLE"
262 ><I
263 >logfilename
264                 </I
265 ></TT
266 >. If not specified then all messages will be 
267                 written to<TT
268 CLASS="REPLACEABLE"
269 ><I
270 >stderr</I
271 ></TT
272 >.
273                 </P
274 ></DD
275 ><DT
276 >-L libdir</DT
277 ><DD
278 ><P
279 >This parameter specifies the location of the 
280                 shared libraries used by <B
281 CLASS="COMMAND"
282 >smbsh</B
283 >. The default
284                 value is specified at compile time.
285                 </P
286 ></DD
287 ></DL
288 ></DIV
289 ></DIV
290 ><DIV
291 CLASS="REFSECT1"
292 ><A
293 NAME="AEN91"
294 ></A
295 ><H2
296 >EXAMPLES</H2
297 ><P
298 >To use the <B
299 CLASS="COMMAND"
300 >smbsh</B
301 > command, execute <B
302 CLASS="COMMAND"
303 >       smbsh</B
304 > from the prompt and enter the username and password 
305         that authenticates you to the machine running the Windows NT 
306         operating system.</P
307 ><P
308 ><PRE
309 CLASS="PROGRAMLISTING"
310 >       <TT
311 CLASS="PROMPT"
312 >system% </TT
313 ><TT
314 CLASS="USERINPUT"
315 ><B
316 >smbsh</B
317 ></TT
318 >
319         <TT
320 CLASS="PROMPT"
321 >Username: </TT
322 ><TT
323 CLASS="USERINPUT"
324 ><B
325 >user</B
326 ></TT
327 >
328         <TT
329 CLASS="PROMPT"
330 >Password: </TT
331 ><TT
332 CLASS="USERINPUT"
333 ><B
334 >XXXXXXX</B
335 ></TT
336 >
337         </PRE
338 ></P
339 ><P
340 >Any dynamically linked command you execute from 
341         this shell will access the <TT
342 CLASS="FILENAME"
343 >/smb</TT
344 > directory 
345         using the smb protocol. For example, the command <B
346 CLASS="COMMAND"
347 >ls /smb
348         </B
349 > will show a list of workgroups. The command 
350         <B
351 CLASS="COMMAND"
352 >ls /smb/MYGROUP </B
353 > will show all the machines in 
354         the  workgroup MYGROUP. The command 
355         <B
356 CLASS="COMMAND"
357 >ls /smb/MYGROUP/&lt;machine-name&gt;</B
358 > will show the share 
359         names for that machine. You could then, for example, use the <B
360 CLASS="COMMAND"
361 >       cd</B
362 > command to change directories, <B
363 CLASS="COMMAND"
364 >vi</B
365 > to 
366         edit files, and <B
367 CLASS="COMMAND"
368 >rcp</B
369 >  to copy files.</P
370 ></DIV
371 ><DIV
372 CLASS="REFSECT1"
373 ><A
374 NAME="AEN112"
375 ></A
376 ><H2
377 >VERSION</H2
378 ><P
379 >This man page is correct for version 2.2 of 
380         the Samba suite.</P
381 ></DIV
382 ><DIV
383 CLASS="REFSECT1"
384 ><A
385 NAME="AEN115"
386 ></A
387 ><H2
388 >BUGS</H2
389 ><P
390 ><B
391 CLASS="COMMAND"
392 >smbsh</B
393 > works by intercepting the standard 
394         libc calls with the dynamically loaded versions in <TT
395 CLASS="FILENAME"
396 >       smbwrapper.o</TT
397 >. Not all calls have been "wrapped", so 
398         some programs may not function correctly under <B
399 CLASS="COMMAND"
400 >smbsh
401         </B
402 >.</P
403 ><P
404 >Programs which are not dynamically linked cannot make 
405         use of <B
406 CLASS="COMMAND"
407 >smbsh</B
408 >'s functionality. Most versions 
409         of UNIX have a <B
410 CLASS="COMMAND"
411 >file</B
412 > command that will 
413         describe how a program was linked.</P
414 ></DIV
415 ><DIV
416 CLASS="REFSECT1"
417 ><A
418 NAME="AEN124"
419 ></A
420 ><H2
421 >SEE ALSO</H2
422 ><P
423 ><A
424 HREF="smbd.8.html"
425 TARGET="_top"
426 ><B
427 CLASS="COMMAND"
428 >smbd(8)</B
429 ></A
430 >, 
431         <A
432 HREF="smb.conf.5.html"
433 TARGET="_top"
434 >smb.conf(5)</A
435 >
436         </P
437 ></DIV
438 ><DIV
439 CLASS="REFSECT1"
440 ><A
441 NAME="AEN130"
442 ></A
443 ><H2
444 >AUTHOR</H2
445 ><P
446 >The original Samba software and related utilities 
447         were created by Andrew Tridgell. Samba is now developed
448         by the Samba Team as an Open Source project similar 
449         to the way the Linux kernel is developed.</P
450 ><P
451 >The original Samba man pages were written by Karl Auer. 
452         The man page sources were converted to YODL format (another 
453         excellent piece of Open Source software, available at
454         <A
455 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
456 TARGET="_top"
457 >       ftp://ftp.icce.rug.nl/pub/unix/</A
458 >) and updated for the Samba 2.0 
459         release by Jeremy Allison.  The conversion to DocBook for 
460         Samba 2.2 was done by Gerald Carter</P
461 ></DIV
462 ></BODY
463 ></HTML
464 >