Cleanup of header files for python extensions.
[tprouty/samba.git] / docs / docbook / manpages / smbsh.1.sgml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="smbsh.1">
3
4 <refmeta>
5         <refentrytitle>smbsh</refentrytitle>
6         <manvolnum>1</manvolnum>
7 </refmeta>
8
9
10 <refnamediv>
11         <refname>smbsh</refname>
12         <refpurpose>Allows access to Windows NT filesystem 
13         using UNIX commands</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17         <cmdsynopsis>
18                 <command>smbsh</command>
19                 <arg choice="opt">-W workgroup</arg>
20                 <arg choice="opt">-U username</arg>
21                 <arg choice="opt">-P prefix</arg>
22                 <arg choice="opt">-R &lt;name resolve order&gt;</arg>
23                 <arg choice="opt">-d &lt;debug level&gt;</arg>
24                 <arg choice="opt">-l logfile</arg>
25                 <arg choice="opt">-L libdir</arg>
26         </cmdsynopsis>
27 </refsynopsisdiv>
28
29 <refsect1>
30         <title>DESCRIPTION</title>
31
32         <para>This tool is part of the <citerefentry><refentrytitle>Samba</refentrytitle>
33         <manvolnum>7</manvolnum></citerefentry> suite.</para>
34
35         <para><command>smbsh</command> allows you to access an NT filesystem 
36         using UNIX commands such as <command>ls</command>, <command>
37         egrep</command>, and <command>rcp</command>. You must use a 
38         shell that is dynamically linked in order for <command>smbsh</command> 
39         to work correctly.</para>
40 </refsect1>
41
42 <refsect1>
43         <title>OPTIONS</title>
44
45         <variablelist>
46             <varlistentry>
47                 <term>-W WORKGROUP</term>
48                 <listitem><para>Override the default workgroup specified in the 
49                 workgroup parameter of the <citerefentry><refentrytitle>smb.conf</refentrytitle>
50                 <manvolnum>5</manvolnum></citerefentry> file 
51                 for this session. This may be needed to connect to some 
52                 servers. </para></listitem>
53             </varlistentry>
54                 
55             <varlistentry>
56                 <term>-U username[%pass]</term>
57                 <listitem><para>Sets the SMB username or username and password.
58                 If this option is not specified, the user will be prompted for 
59                 both the username and the password.  If %pass is not specified, 
60                 the user will be prompted for the password.
61                 </para></listitem>
62             </varlistentry>
63
64             <varlistentry>
65                 <term>-P prefix</term>
66                 <listitem><para>This option allows
67                 the user to set the directory prefix for SMB access. The 
68                 default value if this option is not specified is 
69                 <emphasis>smb</emphasis>.
70                 </para></listitem>
71             </varlistentry>
72
73             <varlistentry>
74                 <term>-R &lt;name resolve order&gt;</term> 
75                 <listitem><para>This option is used to determine what naming 
76                 services and in what order to resolve 
77                 host names to IP addresses. The option takes a space-separated 
78                 string of different name resolution options.</para>
79
80                 <para>The options are: "lmhosts", "host", "wins" and "bcast". 
81                 They cause names to be resolved as follows :</para>
82
83                 <itemizedlist>
84                         <listitem><para><constant>lmhosts</constant>: 
85                         Lookup an IP address in the Samba lmhosts file. If the 
86                         line in lmhosts has no name type attached to the 
87                         NetBIOS name 
88                         (see the <citerefentry><refentrytitle>lmhosts</refentrytitle>
89                         <manvolnum>5</manvolnum></citerefentry> for details) 
90                         then any name type matches for lookup.
91                         </para></listitem>
92
93                         <listitem><para><constant>host</constant>: 
94                         Do a standard host name to IP address resolution, using
95                         the system <filename>/etc/hosts</filename>, NIS, or DNS
96                         lookups. This method of name resolution is operating 
97                         system dependent, for instance on IRIX or Solaris this 
98                         may be controlled by the <filename>/etc/nsswitch.conf
99                         </filename> file).  Note that this method is only used 
100                         if the NetBIOS name type being queried is the 0x20 
101                         (server) name type, otherwise it is ignored.
102                         </para></listitem>
103
104                         <listitem><para><constant>wins</constant>: 
105                         Query a name with the IP address listed in the 
106                         <parameter>wins server</parameter> parameter.  If no 
107                         WINS server has been specified this method will be 
108                         ignored.
109                         </para></listitem>
110
111                         <listitem><para><constant>bcast</constant>: 
112                         Do a broadcast on each of the known local interfaces 
113                         listed in the <parameter>interfaces</parameter>
114                         parameter. This is the least reliable of the name 
115                         resolution methods as it depends on the target host 
116                         being on a locally connected subnet.
117                         </para></listitem>
118                 </itemizedlist>
119
120                 <para>If this parameter is not set then the name resolve order 
121                 defined in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
122                 <manvolnum>5</manvolnum></citerefentry> file parameter  
123                 (<parameter>name resolve order</parameter>) will be used. </para>
124
125                 <para>The default order is lmhosts, host, wins, bcast. Without 
126                 this parameter or any entry in the <parameter>name resolve order
127                 </parameter> parameter of the <citerefentry><refentrytitle>smb.conf</refentrytitle>
128                 <manvolnum>5</manvolnum></citerefentry> file, the name resolution methods 
129                 will be attempted in this order. </para></listitem>
130             </varlistentry>
131
132             <varlistentry>
133                 <term>-d &lt;debug level&gt;</term>
134                 <listitem><para>debug level is an integer from 0 to 10.</para>
135
136                 <para>The default value if this parameter is not specified
137                 is zero.</para>
138
139                 <para>The higher this value, the more detail will be logged
140                 about the activities of <citerefentry><refentrytitle>nmblookup</refentrytitle>
141                 <manvolnum>1</manvolnum></citerefentry>. At level
142                 0, only critical errors and serious warnings will be logged.
143                 </para></listitem>
144             </varlistentry>
145
146             <varlistentry>
147                 <term>-l logfilename</term>
148                 <listitem><para>If specified causes all debug messages to be
149                 written to the file specified by <replaceable>logfilename
150                 </replaceable>. If not specified then all messages will be 
151                 written to<replaceable>stderr</replaceable>.
152                 </para></listitem>
153             </varlistentry>
154
155             <varlistentry>
156                 <term>-L libdir</term>
157                 <listitem><para>This parameter specifies the location of the 
158                 shared libraries used by <command>smbsh</command>. The default
159                 value is specified at compile time.
160                 </para></listitem>
161             </varlistentry>
162
163         </variablelist>
164 </refsect1>
165
166 <refsect1>
167         <title>EXAMPLES</title>
168
169         <para>To use the <command>smbsh</command> command, execute <command>
170         smbsh</command> from the prompt and enter the username and password 
171         that authenticates you to the machine running the Windows NT 
172         operating system.
173 <programlisting>
174 <prompt>system% </prompt><userinput>smbsh</userinput>
175 <prompt>Username: </prompt><userinput>user</userinput>
176 <prompt>Password: </prompt><userinput>XXXXXXX</userinput>
177 </programlisting></para>
178
179
180         <para>Any dynamically linked command you execute from 
181         this shell will access the <filename>/smb</filename> directory 
182         using the smb protocol. For example, the command <command>ls /smb
183         </command> will show a list of workgroups. The command 
184         <command>ls /smb/MYGROUP </command> will show all the machines in 
185         the  workgroup MYGROUP. The command 
186         <command>ls /smb/MYGROUP/&lt;machine-name&gt;</command> will show the share 
187         names for that machine. You could then, for example, use the <command>
188         cd</command> command to change directories, <command>vi</command> to 
189         edit files, and <command>rcp</command>  to copy files.</para>
190 </refsect1>
191
192 <refsect1>
193         <title>VERSION</title>
194
195         <para>This man page is correct for version 3.0 of the Samba suite.</para>
196 </refsect1>
197
198 <refsect1>
199         <title>BUGS</title>
200         
201         <para><command>smbsh</command> works by intercepting the standard 
202         libc calls with the dynamically loaded versions in <filename>
203         smbwrapper.o</filename>. Not all calls have been "wrapped", so 
204         some programs may not function correctly under <command>smbsh
205         </command>.</para>
206
207         <para>Programs which are not dynamically linked cannot make 
208         use of <command>smbsh</command>'s functionality. Most versions 
209         of UNIX have a <command>file</command> command that will 
210         describe how a program was linked.</para>
211 </refsect1>
212
213
214 <refsect1>
215         <title>SEE ALSO</title>
216         <para><citerefentry><refentrytitle>smbd</refentrytitle>
217         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>smb.conf</refentrytitle>
218         <manvolnum>5</manvolnum></citerefentry></para>
219 </refsect1>
220
221 <refsect1>
222         <title>AUTHOR</title>
223         
224         <para>The original Samba software and related utilities 
225         were created by Andrew Tridgell. Samba is now developed
226         by the Samba Team as an Open Source project similar 
227         to the way the Linux kernel is developed.</para>
228         
229         <para>The original Samba man pages were written by Karl Auer. 
230         The man page sources were converted to YODL format (another 
231         excellent piece of Open Source software, available at <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
232         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
233         release by Jeremy Allison.  The conversion to DocBook for 
234         Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2
235         for Samba 3.0 was done by Alexander Bokovoy.</para>
236 </refsect1>
237
238 </refentry>