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