Documented -b for brief option.
[samba.git] / docs / faq / sambafaq-3.html
1 <HTML>
2 <HEAD>
3 <TITLE> Samba FAQ: Common client questions</TITLE>
4 </HEAD>
5 <BODY>
6 <A HREF="sambafaq-2.html">Previous</A>
7 <A HREF="sambafaq-4.html">Next</A>
8 <A HREF="sambafaq.html#toc3">Table of Contents</A>
9 <HR>
10 <H2><A NAME="s3">3. Common client questions</A></H2>
11
12 <P> 
13 <A NAME="client_questions"></A> 
14 </P>
15
16 <H2><A NAME="ss3.1">3.1 Are any Macintosh clients for Samba</A></H2>
17
18 <P> 
19 <A NAME="mac_clients"></A> 
20 </P>
21 <P>In Rob Newberry's words (rob@eats.com, Sun, 4 Dec 1994):</P>
22 <P>The answer is "No." Samba speaks SMB, the protocol used for Microsoft
23 networks.  The Macintosh has ALWAYS spoken Appletalk. Even with
24 Microsoft "services for Macintosh", it has been a matter of making the
25 server speak Appletalk. It is the same for Novell Netware and the
26 Macintosh, although I believe Novell has (VERY LATE) released an
27 extension for the Mac to let it speak IPX.</P>
28 <P>In future Apple System Software, you may see support for other
29 protocols, such as SMB -- Applet is working on a new networking
30 architecture that will --> -- make it easier to support additional
31 protocols. But it's not here yet.</P>
32 <P>Now, the nice part is that if you want your Unix machine to speak
33 Appletalk, there are several options. "Netatalk" and "CAP" are free,
34 and available on the net. There are also several commercial options,
35 such as "PacerShare" and "Helios" (I think). In any case, you'll have
36 to look around for a server, not anything for the Mac.</P>
37 <P>Depending on you OS, some of these may not help you. I am currently
38 coordinating the effort to get CAP working with Native Ethertalk under
39 Linux, but we're not done yet.</P>
40
41
42
43 <H2><A NAME="ss3.2">3.2 "Session request failed (131,130)" error</A></H2>
44
45 <P> 
46 <A NAME="sess_req_fail"></A> 
47 </P>
48 <P>The following answer is provided by John E. Miller:</P>
49 <P>I'll assume that you're able to ping back and forth between the
50 machines by IP address and name, and that you're using some security
51 model where you're confident that you've got user IDs and passwords
52 right.  The logging options (-d3 or greater) can help a lot with that.
53 DNS and WINS configuration can also impact connectivity as well.</P>
54 <P>Now, on to 'scope id's.  Somewhere in your Win95 TCP/IP network
55 configuration (I'm too much of an NT bigot to know where it's located
56 in the Win95 setup, but I'll have to learn someday since I teach for a
57 Microsoft Solution Provider Authorized Tech Education Center - what an
58 acronym...) <F>Note: It's under Control Panel | Network | TCP/IP | WINS
59 Configuration</F> there's a little text entry field called something like
60 'Scope ID'.</P>
61 <P>This field essentially creates 'invisible' sub-workgroups on the same
62 wire.  Boxes can only see other boxes whose Scope IDs are set to the
63 exact same value - it's sometimes used by OEMs to configure their
64 boxes to browse only other boxes from the same vendor and, in most
65 environments, this field should be left blank.  If you, in fact, have
66 something in this box that EXACT value (case-sensitive!) needs to be
67 provided to smbclient and nmbd as the -i (lowercase) parameter. So, if
68 your Scope ID is configured as the string 'SomeStr' in Win95 then
69 you'd have to use smbclient -iSomeStr <F>otherparms</F> in connecting to
70 it.</P>
71
72
73 <H2><A NAME="ss3.3">3.3 How do I synchronise my PC's clock with my Samba server? </A></H2>
74
75 <P>
76 <A NAME="synchronise_clock"></A> 
77 </P>
78 <P>To syncronize your PC's clock with your Samba server:</P>
79 <P>* Copy timesync.pif to your windows directory
80 * timesync.pif can be found at:
81 http://samba.canberra.edu.au/pub/samba/binaries/miscellaneous/timesync.pif
82 * Add timesync.pif to your 'Start Up' group/folder
83 * Open the properties dialog box for the program/icon
84 * Make sure the 'Run Minimized' option is set in program
85 'Properties'
86 * Change the command line section that reads \\sambahost to reflect
87 the name
88 of your server.
89 * Close the properties dialog box by choosing 'OK'</P>
90 <P>Each time you start your computer (or login for Win95) your PC will
91 synchronize it's clock with your Samba server.</P>
92
93
94 <H2><A NAME="ss3.4">3.4 Problems with WinDD, NTrigue, WinCenterPro etc</A></H2>
95
96 <P>
97 <A NAME="multiple_session_clients"></A> 
98 </P>
99 <P>All of the above programs are applications that sit on an NT box and
100 allow multiple users to access the NT GUI applications from remote
101 workstations (often over X).</P>
102 <P>What has this got to do with Samba? The problem comes when these users
103 use filemanager to mount shares from a Samba server. The most common
104 symptom is that the first user to connect get correct file permissions
105 and has a nice day, but subsequent connections get logged in as the
106 same user as the first person to login. They find that they cannot
107 access files in their own home directory, but that they can access
108 files in the first users home directory (maybe not such a nice day
109 after all?)</P>
110 <P>Why does this happen? The above products all share a common heritage
111 (and code base I believe). They all open just a single TCP based SMB
112 connection to the Samba server, and requests from all users are piped
113 over this connection. This is unfortunate, but not fatal.</P>
114 <P>It means that if you run your Samba server in share level security
115 (the default) then things will definately break as described
116 above. The share level SMB security model has no provision for
117 multiple user IDs on the one SMB connection. See security_level.txt in
118 the docs for more info on share/user/server level security.</P>
119 <P>If you run in user or server level security then you have a chance,
120 but only if you have a recent version of Samba (at least 1.9.15p6). In
121 older versions bugs in Samba meant you still would have had problems.</P>
122 <P>If you have a trapdoor uid system in your OS then it will never work
123 properly. Samba needs to be able to switch uids on the connection and
124 it can't if your OS has a trapdoor uid system. You'll know this
125 because Samba will note it in your logs.</P>
126 <P>Also note that you should not use the magic "homes" share name with
127 products like these, as otherwise all users will end up with the same
128 home directory. Use \\server\username instead.</P>
129
130
131 <H2><A NAME="ss3.5">3.5 Problem with printers under NT</A></H2>
132
133 <P> 
134 <A NAME="nt_printers"></A> 
135 </P>
136 <P>This info from Stefan Hergeth
137 hergeth@f7axp1.informatik.fh-muenchen.de may be useful:</P>
138 <P>A network-printer (with ethernetcard) is connected to the NT-Clients
139 via our UNIX-Fileserver (SAMBA-Server), like the configuration told by
140 Matthew Harrell harrell@leech.nrl.navy.mil (see WinNT.txt)</P>
141 <P>1.) If a user has choosen this printer as the default printer in his
142 NT-Session and this printer is not connected to the network
143 (e.g. switched off) than this user has a problem with the SAMBA-
144 connection of his filesystems. It's very slow.</P>
145 <P>2.) If the printer is connected to the network everything works fine.</P>
146 <P>3.) When the smbd ist started with debug level 3, you can see that
147 the
148 NT spooling system try to connect to the printer many times. If
149 the
150 printer ist not connected to the network this request fails and
151 the
152 NT spooler is wasting a lot of time to connect to the printer
153 service.
154 This seems to be the reason for the slow network connection.</P>
155 <P>4.) Maybe it's possible to change this behaviour by setting different
156 printer properties in the Print-Manager-Menu of NT, but i didn't try
157 it yet.</P>
158
159
160 <H2><A NAME="ss3.6">3.6 Why are my file's timestamps off by an hour, or by a few hours?</A></H2>
161
162 <P>
163 <A NAME="dst_bugs"></A> 
164 </P>
165 <P>This is from Paul Eggert eggert@twinsun.com.</P>
166 <P>Most likely it's a problem with your time zone settings.</P>
167 <P>Internally, Samba maintains time in traditional Unix format,
168 namely, the number of seconds since 1970-01-01 00:00:00 Universal Time
169 (or ``GMT''), not counting leap seconds.</P>
170 <P>On the server side, Samba uses the Unix TZ variable to convert
171 internal
172 timestamps to and from local time.  So on the server side, there are
173 two
174 things to get right.</P>
175 <P>1.  The Unix system clock must have the correct Universal
176 time.
177 Use the shell command "sh -c 'TZ=UTC0 date'" to check this.</P>
178 <P>2.  The TZ environment variable must be set on the server
179 before Samba is invoked.  The details of this depend on the
180 server OS, but typically you must edit a file whose name is
181 /etc/TIMEZONE or /etc/default/init, or run the command `zic
182 -l'.</P>
183 <P>3.  TZ must have the correct value.</P>
184 <P>3a.  If possible, use geographical time zone settings
185 (e.g. TZ='America/Los_Angeles' or perhaps
186 TZ=':US/Pacific').  These are supported by most
187 popular Unix OSes, are easier to get right, and are
188 more accurate for historical timestamps.  If your
189 operating system has out-of-date tables, you should be
190 able to update them from the public domain time zone
191 tables at URL:ftp://elsie.nci.nih.gov/pub/.</P>
192 <P>3b.  If your system does not support geographical time
193 zone
194 settings, you must use a Posix-style TZ strings, e.g.
195 TZ='PST8PDT,M4.1.0/2,M10.5.0/2' for US Pacific time.
196 Posix TZ strings can take the following form (with
197 optional
198 items in brackets):</P>
199 <P>StdOffset<F>Dst[Offset</F>,Date/Time,Date/Time]</P>
200 <P>where:</P>
201 <P>`Std' is the standard time designation
202 (e.g. `PST').</P>
203 <P>`Offset' is the number of hours behind UTC
204 (e.g. `8').
205 Prepend a `-' if you are ahead of UTC, and
206 append `:30' if you are at a half-hour offset.
207 Omit all the remaining items if you do not use
208 daylight-saving time.</P>
209 <P>`Dst' is the daylight-saving time designation
210 (e.g. `PDT').</P>
211 <P>The optional second `Offset' is the number of
212 hours that daylight-saving time is behind UTC.
213 The default is 1 hour ahead of standard time.</P>
214 <P>`Date/Time,Date/Time' specify when
215 daylight-saving
216 time starts and ends.  The format for a date
217 is
218 `Mm.n.d', which specifies the dth day (0 is
219 Sunday)
220 of the nth week of the mth month, where week 5
221 means
222 the last such day in the month.  The format
223 for a
224 time is <F>h</F>h<F>:mm[:ss</F>], using a 24-hour clock.</P>
225 <P>Other Posix string formats are allowed but you don't
226 want
227 to know about them.</P>
228 <P>On the client side, you must make sure that your client's clock and
229 time zone is also set appropriately.  <F>[I don't know how to do this.</F>]
230 Samba traditionally has had many problems dealing with time zones, due
231 to the bizarre ways that Microsoft network protocols handle time
232 zones.  A common symptom is for file timestamps to be off by an hour.
233 To work around the problem, try disconnecting from your Samba server
234 and then reconnecting to it; or upgrade your Samba server to
235 1.9.16alpha10 or later.</P>
236
237
238 <H2><A NAME="ss3.7">3.7 How do I set the printer driver name correctly? </A></H2>
239
240 <P>
241 <A NAME="printer_driver_name"></A> 
242 </P>
243 <P>Question:
244 > On NT, I opened "Printer Manager" and "Connect to Printer".
245 > Enter "\\ptdi270\ps1" in the box of printer. I got the
246 > following error message:
247 >
248 >     You do not have sufficient access to your machine
249 >     to connect to the selected printer, since a driver
250 >     needs to be installed locally.</P>
251 <P>Answer:</P>
252 <P>In the more recent versions of Samba you can now set the "printer
253 driver" in smb.conf. This tells the client what driver to use. For
254 example, I have:</P>
255 <P>printer driver = HP LaserJet 4L</P>
256 <P>and NT knows to use the right driver. You have to get this string
257 exactly right.</P>
258 <P>To find the exact string to use, you need to get to the dialog box in
259 your client where you select which printer driver to install. The
260 correct strings for all the different printers are shown in a listbox
261 in that dialog box.</P>
262 <P>You could also try setting the driver to NULL like this:</P>
263 <P>printer driver = NULL</P>
264 <P>this is effectively what older versions of Samba did, so if that
265 worked for you then give it a go. If this does work then let me know
266 and I'll make it the default. Currently the default is a 0 length
267 string.</P>
268
269
270 <HR>
271 <A HREF="sambafaq-2.html">Previous</A>
272 <A HREF="sambafaq-4.html">Next</A>
273 <A HREF="sambafaq.html#toc3">Table of Contents</A>
274 </BODY>
275 </HTML>