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