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