updated the 3.0 branch from the head branch - ready for alpha18
[sfrench/samba-autobuild/.git] / docs / manpages / smbsh.1
1 .\" This manpage has been automatically generated by docbook2man-spec
2 .\" from a DocBook document.  docbook2man-spec can be found at:
3 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
4 .\" Please send any bug reports, improvements, comments, patches, 
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "SMBSH" "1" "08 May 2002" "" ""
7 .SH NAME
8 smbsh \- Allows access to Windows NT filesystem  using UNIX commands
9 .SH SYNOPSIS
10 .sp
11 \fBsmbsh\fR [ \fB-W workgroup\fR ]  [ \fB-U username\fR ]  [ \fB-P prefix\fR ]  [ \fB-R <name resolve order>\fR ]  [ \fB-d <debug level>\fR ]  [ \fB-l logfile\fR ]  [ \fB-L libdir\fR ] 
12 .SH "DESCRIPTION"
13 .PP
14 This tool is part of the  Sambasuite.
15 .PP
16 \fBsmbsh\fR allows you to access an NT filesystem 
17 using UNIX commands such as \fBls\fR, \fB egrep\fR, and \fBrcp\fR. You must use a 
18 shell that is dynamically linked in order for \fBsmbsh\fR 
19 to work correctly.
20 .SH "OPTIONS"
21 .TP
22 \fB-W WORKGROUP\fR
23 Override the default workgroup specified in the 
24 workgroup parameter of the \fIsmb.conf\fR file 
25 for this session. This may be needed to connect to some 
26 servers. 
27 .TP
28 \fB-U username[%pass]\fR
29 Sets the SMB username or username and password.
30 If this option is not specified, the user will be prompted for 
31 both the username and the password. If %pass is not specified, 
32 the user will be prompted for the password.
33 .TP
34 \fB-P prefix\fR
35 This option allows
36 the user to set the directory prefix for SMB access. The 
37 default value if this option is not specified is 
38 \fBsmb\fR.
39 .TP
40 \fB-R <name resolve order>\fR
41 This option is used to determine what naming 
42 services and in what order to resolve 
43 host names to IP addresses. The option takes a space-separated 
44 string of different name resolution options.
45
46 The options are :"lmhosts", "host", "wins" and "bcast". 
47 They cause names to be resolved as follows :
48 .RS
49 .TP 0.2i
50 \(bu
51 lmhosts : 
52 Lookup an IP address in the Samba lmhosts file. If the 
53 line in lmhosts has no name type attached to the 
54 NetBIOS name 
55 (see the lmhosts(5)
56 for details) then any name type matches for lookup.
57 .TP 0.2i
58 \(bu
59 host : 
60 Do a standard host name to IP address resolution, using
61 the system \fI/etc/hosts\fR, NIS, or DNS
62 lookups. This method of name resolution is operating 
63 system dependent, for instance on IRIX or Solaris this 
64 may be controlled by the \fI/etc/nsswitch.conf
65 \fRfile). Note that this method is only used 
66 if the NetBIOS name type being queried is the 0x20 
67 (server) name type, otherwise it is ignored.
68 .TP 0.2i
69 \(bu
70 wins : 
71 Query a name with the IP address listed in the 
72 \fIwins server\fR parameter. If no 
73 WINS server has been specified this method will be 
74 ignored.
75 .TP 0.2i
76 \(bu
77 bcast : 
78 Do a broadcast on each of the known local interfaces 
79 listed in the \fIinterfaces\fR
80 parameter. This is the least reliable of the name 
81 resolution methods as it depends on the target host 
82 being on a locally connected subnet.
83 .RE
84 .PP
85 If this parameter is not set then the name resolve order 
86 defined in the \fIsmb.conf\fR file parameter 
87 (name resolve order) will be used. 
88 .PP
89 .PP
90 The default order is lmhosts, host, wins, bcast. Without 
91 this parameter or any entry in the \fIname resolve order
92 \fRparameter of the \fIsmb.conf\fR 
93 file, the name resolution methods will be attempted in this 
94 order. 
95 .PP
96 .TP
97 \fB-d <debug level>\fR
98 debug level is an integer from 0 to 10.
99
100 The default value if this parameter is not specified
101 is zero.
102
103 The higher this value, the more detail will be logged
104 about the activities of \fBnmblookup\fR. At level
105 0, only critical errors and serious warnings will be logged.
106 .TP
107 \fB-l logfilename\fR
108 If specified causes all debug messages to be
109 written to the file specified by \fIlogfilename
110 \fR\&. If not specified then all messages will be 
111 written to\fIstderr\fR.
112 .TP
113 \fB-L libdir\fR
114 This parameter specifies the location of the 
115 shared libraries used by \fBsmbsh\fR. The default
116 value is specified at compile time.
117 .SH "EXAMPLES"
118 .PP
119 To use the \fBsmbsh\fR command, execute \fB smbsh\fR from the prompt and enter the username and password 
120 that authenticates you to the machine running the Windows NT 
121 operating system.
122 .PP
123 .sp
124 .nf
125         system% \fBsmbsh\fR
126         Username: \fBuser\fR
127         Password: \fBXXXXXXX\fR
128         
129 .sp
130 .fi
131 .PP
132 Any dynamically linked command you execute from 
133 this shell will access the \fI/smb\fR directory 
134 using the smb protocol. For example, the command \fBls /smb
135 \fRwill show a list of workgroups. The command 
136 \fBls /smb/MYGROUP \fR will show all the machines in 
137 the workgroup MYGROUP. The command 
138 \fBls /smb/MYGROUP/<machine-name>\fR will show the share 
139 names for that machine. You could then, for example, use the \fB cd\fR command to change directories, \fBvi\fR to 
140 edit files, and \fBrcp\fR to copy files.
141 .SH "VERSION"
142 .PP
143 This man page is correct for version 2.2 of 
144 the Samba suite.
145 .SH "BUGS"
146 .PP
147 \fBsmbsh\fR works by intercepting the standard 
148 libc calls with the dynamically loaded versions in \fI smbwrapper.o\fR. Not all calls have been "wrapped", so 
149 some programs may not function correctly under \fBsmbsh
150 \fR\&.
151 .PP
152 Programs which are not dynamically linked cannot make 
153 use of \fBsmbsh\fR's functionality. Most versions 
154 of UNIX have a \fBfile\fR command that will 
155 describe how a program was linked.
156 .SH "SEE ALSO"
157 .PP
158 \fBsmbd(8)\fR, 
159 smb.conf(5)
160 .SH "AUTHOR"
161 .PP
162 The original Samba software and related utilities 
163 were created by Andrew Tridgell. Samba is now developed
164 by the Samba Team as an Open Source project similar 
165 to the way the Linux kernel is developed.
166 .PP
167 The original Samba man pages were written by Karl Auer. 
168 The man page sources were converted to YODL format (another 
169 excellent piece of Open Source software, available at
170 ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0 
171 release by Jeremy Allison. The conversion to DocBook for 
172 Samba 2.2 was done by Gerald Carter