man pages: Move 'smbsh' man page to the examples directory.
[samba.git] / examples / libsmbclient / smbwrapper / smbsh.1
1 .\"     Title: smbsh
2 .\"    Author:
3 .\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
4 .\"      Date: 06/12/2008
5 .\"    Manual: User Commands
6 .\"    Source: Samba 3.2
7 .\"
8 .TH "SMBSH" "1" "06/12/2008" "Samba 3\.2" "User Commands"
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 smbsh - Allows access to remote SMB shares using UNIX commands
15 .SH "SYNOPSIS"
16 .HP 1
17 smbsh [\-W\ workgroup] [\-U\ username] [\-P\ prefix] [\-R\ <name\ resolve\ order>] [\-d\ <debug\ level>] [\-l\ logdir] [\-L\ libdir]
18 .SH "DESCRIPTION"
19 .PP
20 This tool is part of the
21 \fBsamba\fR(7)
22 suite\.
23 .PP
24 smbsh
25 allows you to access an NT filesystem using UNIX commands such as
26 ls,
27 egrep, and
28 rcp\. You must use a shell that is dynamically linked in order for
29 smbsh
30 to work correctly\.
31 .SH "OPTIONS"
32 .PP
33 \-W WORKGROUP
34 .RS 4
35 Override the default workgroup specified in the workgroup parameter of the
36 \fBsmb.conf\fR(5)
37 file for this session\. This may be needed to connect to some servers\.
38 .RE
39 .PP
40 \-U username[%pass]
41 .RS 4
42 Sets the SMB username or username and password\. If this option is not specified, the user will be prompted for both the username and the password\. If %pass is not specified, the user will be prompted for the password\.
43 .RE
44 .PP
45 \-P prefix
46 .RS 4
47 This option allows the user to set the directory prefix for SMB access\. The default value if this option is not specified is
48 \fIsmb\fR\.
49 .RE
50 .PP
51 \-s <configuration file>
52 .RS 4
53 The file specified contains the configuration details required by the server\. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\. See
54 \fIsmb\.conf\fR
55 for more information\. The default configuration file name is determined at compile time\.
56 .RE
57 .PP
58 \-d|\-\-debuglevel=level
59 .RS 4
60 \fIlevel\fR
61 is an integer from 0 to 10\. The default value if this parameter is not specified is 0\.
62 .sp
63 The higher this value, the more detail will be logged to the log files about the activities of the server\. At level 0, only critical errors and serious warnings will be logged\. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\.
64 .sp
65 Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\.
66 .sp
67 Note that specifying this parameter here will override the
68 \fIlog level\fR
69 parameter in the
70 \fIsmb\.conf\fR
71 file\.
72 .RE
73 .PP
74 \-R <name resolve order>
75 .RS 4
76 This option is used to determine what naming services and in what order to resolve host names to IP addresses\. The option takes a space\-separated string of different name resolution options\.
77 .sp
78 The options are: "lmhosts", "host", "wins" and "bcast"\. They cause names to be resolved as follows :
79 .sp
80 .RS 4
81 .ie n \{\
82 \h'-04'\(bu\h'+03'\c
83 .\}
84 .el \{\
85 .sp -1
86 .IP \(bu 2.3
87 .\}
88 \fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\. If the line in lmhosts has no name type attached to the NetBIOS name (see the
89 \fBlmhosts\fR(5)
90 for details) then any name type matches for lookup\.
91 .RE
92 .sp
93 .RS 4
94 .ie n \{\
95 \h'-04'\(bu\h'+03'\c
96 .\}
97 .el \{\
98 .sp -1
99 .IP \(bu 2.3
100 .\}
101 \fBhost\fR: Do a standard host name to IP address resolution, using the system
102 \fI/etc/hosts\fR, NIS, or DNS lookups\. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the
103 \fI/etc/nsswitch\.conf \fR
104 file)\. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\.
105 .RE
106 .sp
107 .RS 4
108 .ie n \{\
109 \h'-04'\(bu\h'+03'\c
110 .\}
111 .el \{\
112 .sp -1
113 .IP \(bu 2.3
114 .\}
115 \fBwins\fR: Query a name with the IP address listed in the
116 \fIwins server\fR
117 parameter\. If no WINS server has been specified this method will be ignored\.
118 .RE
119 .sp
120 .RS 4
121 .ie n \{\
122 \h'-04'\(bu\h'+03'\c
123 .\}
124 .el \{\
125 .sp -1
126 .IP \(bu 2.3
127 .\}
128 \fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
129 \fIinterfaces\fR
130 parameter\. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\.
131 .sp
132 .RE
133 If this parameter is not set then the name resolve order defined in the
134 \fIsmb\.conf\fR
135 file parameter (\fIname resolve order\fR) will be used\.
136 .sp
137 The default order is lmhosts, host, wins, bcast\. Without this parameter or any entry in the
138 \fIname resolve order\fR
139 parameter of the
140 \fIsmb\.conf\fR
141 file, the name resolution methods will be attempted in this order\.
142 .RE
143 .PP
144 \-L libdir
145 .RS 4
146 This parameter specifies the location of the shared libraries used by
147 smbsh\. The default value is specified at compile time\.
148 .RE
149 .SH "EXAMPLES"
150 .PP
151 To use the
152 smbsh
153 command, execute
154 smbsh
155 from the prompt and enter the username and password that authenticates you to the machine running the Windows NT operating system\.
156 .sp
157 .RS 4
158 .nf
159 system% \fBsmbsh\fR
160 Username: \fBuser\fR
161 Password: \fBXXXXXXX\fR
162 .fi
163 .RE
164 .PP
165 Any dynamically linked command you execute from this shell will access the
166 \fI/smb\fR
167 directory using the smb protocol\. For example, the command
168 ls /smb
169 will show a list of workgroups\. The command
170 ls /smb/MYGROUP
171 will show all the machines in the workgroup MYGROUP\. The command
172 ls /smb/MYGROUP/<machine\-name>
173 will show the share names for that machine\. You could then, for example, use the
174 cd
175 command to change directories,
176 vi
177 to edit files, and
178 rcp
179 to copy files\.
180 .SH "VERSION"
181 .PP
182 This man page is correct for version 3 of the Samba suite\.
183 .SH "BUGS"
184 .PP
185 smbsh
186 works by intercepting the standard libc calls with the dynamically loaded versions in
187 \fI smbwrapper\.o\fR\. Not all calls have been "wrapped", so some programs may not function correctly under
188 smbsh\.
189 .PP
190 Programs which are not dynamically linked cannot make use of
191 smbsh\'s functionality\. Most versions of UNIX have a
192 file
193 command that will describe how a program was linked\.
194 .SH "SEE ALSO"
195 .PP
196 \fBsmbd\fR(8),
197 \fBsmb.conf\fR(5)
198 .SH "AUTHOR"
199 .PP
200 The original Samba software and related utilities were created by Andrew Tridgell\. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\.
201 .PP
202 The original Samba man pages were written by Karl Auer\. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at
203 ftp://ftp\.icce\.rug\.nl/pub/unix/) and updated for the Samba 2\.0 release by Jeremy Allison\. The conversion to DocBook for Samba 2\.2 was done by Gerald Carter\. The conversion to DocBook XML 4\.2 for Samba 3\.0 was done by Alexander Bokovoy\.