Fixed the "You password will expire in 0 days. Would you like to
[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 there any Macintosh clients for Samba?</A></H2>
17
18 <P> 
19 <A NAME="mac_clients"></A> 
20
21 Yes! Thursby now have a CIFS Client / Server called DAVE - see 
22 <A HREF="http://www.thursby.com/">http://www.thursby.com/</A>.
23 They test it against Windows 95, Windows NT and samba for compatibility issues.
24 At the time of writing, DAVE was at version 1.0.1. The 1.0.0 to 1.0.1 update is available 
25 as a free download from the Thursby web site (the speed of finder copies has
26 been greatly enhanced, and there are bug-fixes included).</P>
27 <P>Alternatives - There are two free implementations of AppleTalk for
28 several kinds of UNIX machnes, and several more commercial ones.
29 These products allow you to run file services and print services
30 natively to Macintosh users, with no additional support required on
31 the Macintosh.  The two free omplementations are Netatalk,
32 <A HREF="http://www.umich.edu/~rsug/netatalk/">http://www.umich.edu/~rsug/netatalk/</A>, and CAP, 
33 <A HREF="http://www.cs.mu.oz.au/appletalk/atalk.html">http://www.cs.mu.oz.au/appletalk/atalk.html</A>.  What Samba offers 
34 MS Windows users, these packages offer to Macs.  For more info on
35 these packages, Samba, and Linux (and other UNIX-based systems)
36 see 
37 <A HREF="http://www.eats.com/linux_mac_win.html">http://www.eats.com/linux_mac_win.html</A></P>
38
39
40 <H2><A NAME="ss3.2">3.2 "Session request failed (131,130)" error</A></H2>
41
42 <P> 
43 <A NAME="sess_req_fail"></A> 
44
45 The following answer is provided by John E. Miller:</P>
46 <P>I'll assume that you're able to ping back and forth between the
47 machines by IP address and name, and that you're using some security
48 model where you're confident that you've got user IDs and passwords
49 right.  The logging options (-d3 or greater) can help a lot with that.
50 DNS and WINS configuration can also impact connectivity as well.</P>
51 <P>Now, on to 'scope id's.  Somewhere in your Win95 TCP/IP network
52 configuration (I'm too much of an NT bigot to know where it's located
53 in the Win95 setup, but I'll have to learn someday since I teach for a
54 Microsoft Solution Provider Authorized Tech Education Center - what an
55 acronym...) <F>Note: It's under Control Panel | Network | TCP/IP | WINS
56 Configuration</F> there's a little text entry field called something like
57 'Scope ID'.</P>
58 <P>This field essentially creates 'invisible' sub-workgroups on the same
59 wire.  Boxes can only see other boxes whose Scope IDs are set to the
60 exact same value - it's sometimes used by OEMs to configure their
61 boxes to browse only other boxes from the same vendor and, in most
62 environments, this field should be left blank.  If you, in fact, have
63 something in this box that EXACT value (case-sensitive!) needs to be
64 provided to smbclient and nmbd as the -i (lowercase) parameter. So, if
65 your Scope ID is configured as the string 'SomeStr' in Win95 then
66 you'd have to use smbclient -iSomeStr <F>otherparms</F> in connecting to
67 it.</P>
68
69
70 <H2><A NAME="ss3.3">3.3 How do I synchronise my PC's clock with my Samba server? </A></H2>
71
72 <P>
73 <A NAME="synchronise_clock"></A> 
74
75 To syncronize your PC's clock with your Samba server:
76 <UL>
77 <LI> Copy timesync.pif to your windows directory</LI>
78 <LI> timesync.pif can be found at:
79 <A HREF="http://samba.org/samba/binaries/miscellaneous/timesync.pif">http://samba.org/samba/binaries/miscellaneous/timesync.pif</A></LI>
80 <LI> Add timesync.pif to your 'Start Up' group/folder</LI>
81 <LI> Open the properties dialog box for the program/icon</LI>
82 <LI> Make sure the 'Run Minimized' option is set in program 'Properties'</LI>
83 <LI> Change the command line section that reads <F>\\sambahost</F> to reflect the name of your server.</LI>
84 <LI> Close the properties dialog box by choosing 'OK'</LI>
85 </UL>
86
87 Each time you start your computer (or login for Win95) your PC will
88 synchronize its clock with your Samba server.</P>
89 <P>Alternativley, if you clients support Domain Logons, you can setup Domain Logons with Samba
90 - see: 
91 <A HREF="ftp://samba.org/pub/samba/docs/BROWSING.txt">BROWSING.txt</A> *** for more information.</P>
92 <P>Then add 
93 <BLOCKQUOTE><CODE>
94 <PRE>
95 NET TIME \\%L /SET /YES
96 </PRE>
97 </CODE></BLOCKQUOTE>
98
99 as one of the lines in the logon script.</P>
100
101 <H2><A NAME="ss3.4">3.4 Problems with WinDD, NTrigue, WinCenterPro etc</A></H2>
102
103 <P>
104 <A NAME="multiple_session_clients"></A> 
105 </P>
106 <P>All of the above programs are applications that sit on an NT box and
107 allow multiple users to access the NT GUI applications from remote
108 workstations (often over X).</P>
109 <P>What has this got to do with Samba? The problem comes when these users
110 use filemanager to mount shares from a Samba server. The most common
111 symptom is that the first user to connect get correct file permissions
112 and has a nice day, but subsequent connections get logged in as the
113 same user as the first person to login. They find that they cannot
114 access files in their own home directory, but that they can access
115 files in the first users home directory (maybe not such a nice day
116 after all?)</P>
117 <P>Why does this happen? The above products all share a common heritage
118 (and code base I believe). They all open just a single TCP based SMB
119 connection to the Samba server, and requests from all users are piped
120 over this connection. This is unfortunate, but not fatal.</P>
121 <P>It means that if you run your Samba server in share level security
122 (the default) then things will definately break as described
123 above. The share level SMB security model has no provision for
124 multiple user IDs on the one SMB connection. See 
125 <A HREF="ftp://samba.org/pub/samba/docs/security_level.txt">security_level.txt</A> in
126 the docs for more info on share/user/server level security.</P>
127 <P>If you run in user or server level security then you have a chance,
128 but only if you have a recent version of Samba (at least 1.9.15p6). In
129 older versions bugs in Samba meant you still would have had problems.</P>
130 <P>If you have a trapdoor uid system in your OS then it will never work
131 properly. Samba needs to be able to switch uids on the connection and
132 it can't if your OS has a trapdoor uid system. You'll know this
133 because Samba will note it in your logs.</P>
134 <P>Also note that you should not use the magic "homes" share name with
135 products like these, as otherwise all users will end up with the same
136 home directory. Use <F>\\server\username</F> instead.</P>
137
138
139 <H2><A NAME="ss3.5">3.5 Problem with printers under NT</A></H2>
140
141 <P> 
142 <A NAME="nt_printers"></A> 
143
144 This info from Stefan Hergeth
145 hergeth@f7axp1.informatik.fh-muenchen.de may be useful:</P>
146 <P>A network-printer (with ethernetcard) is connected to the NT-Clients
147 via our UNIX-Fileserver (SAMBA-Server), like the configuration told by
148 Matthew Harrell harrell@leech.nrl.navy.mil (see WinNT.txt)
149 <OL>
150 <LI>If a user has choosen this printer as the default printer in his
151 NT-Session and this printer is not connected to the network
152 (e.g. switched off) than this user has a problem with the SAMBA-
153 connection of his filesystems. It's very slow.
154 </LI>
155 <LI>If the printer is connected to the network everything works fine.
156 </LI>
157 <LI>When the smbd ist started with debug level 3, you can see that the
158 NT spooling system try to connect to the printer many times. If the
159 printer ist not connected to the network this request fails and the
160 NT spooler is wasting a lot of time to connect to the printer service.
161 This seems to be the reason for the slow network connection.
162 </LI>
163 <LI>Maybe it's possible to change this behaviour by setting different 
164 printer properties in the Print-Manager-Menu of NT, but i didn't try it yet.</LI>
165 </OL>
166 </P>
167
168
169 <H2><A NAME="ss3.6">3.6 Why are my file's timestamps off by an hour, or by a few hours?</A></H2>
170
171 <P>
172 <A NAME="dst_bugs"></A> 
173
174 This is from Paul Eggert eggert@twinsun.com.</P>
175 <P>Most likely it's a problem with your time zone settings.</P>
176 <P>Internally, Samba maintains time in traditional Unix format,
177 namely, the number of seconds since 1970-01-01 00:00:00 Universal Time
178 (or ``GMT''), not counting leap seconds.</P>
179 <P>On the server side, Samba uses the Unix TZ variable to convert
180 internal timestamps to and from local time.  So on the server side, there are
181 two things to get right.
182 <OL>
183 <LI>The Unix system clock must have the correct Universal time.
184 Use the shell command "sh -c 'TZ=UTC0 date'" to check this.
185 </LI>
186 <LI>The TZ environment variable must be set on the server
187 before Samba is invoked.  The details of this depend on the
188 server OS, but typically you must edit a file whose name is
189 /etc/TIMEZONE or /etc/default/init, or run the command `zic -l'.
190 </LI>
191 <LI>TZ must have the correct value.
192 <OL>
193 <LI>If possible, use geographical time zone settings
194 (e.g. TZ='America/Los_Angeles' or perhaps
195 TZ=':US/Pacific').  These are supported by most
196 popular Unix OSes, are easier to get right, and are
197 more accurate for historical timestamps.  If your
198 operating system has out-of-date tables, you should be
199 able to update them from the public domain time zone
200 tables at 
201 <A HREF="ftp://elsie.nci.nih.gov/pub/">ftp://elsie.nci.nih.gov/pub/</A>.
202 </LI>
203 <LI>If your system does not support geographical timezone
204 settings, you must use a Posix-style TZ strings, e.g.
205 TZ='PST8PDT,M4.1.0/2,M10.5.0/2' for US Pacific time.
206 Posix TZ strings can take the following form (with optional
207 items in brackets):
208 <PRE>
209         StdOffset[Dst[Offset],Date/Time,Date/Time]
210 </PRE>
211
212 where:
213 <UL>
214 <LI>                        `Std' is the standard time designation (e.g. `PST').
215 </LI>
216 <LI>                        `Offset' is the number of hours behind UTC (e.g. `8').
217 Prepend a `-' if you are ahead of UTC, and
218 append `:30' if you are at a half-hour offset.
219 Omit all the remaining items if you do not use
220 daylight-saving time.
221 </LI>
222 <LI>                        `Dst' is the daylight-saving time designation
223 (e.g. `PDT').
224
225 The optional second `Offset' is the number of
226 hours that daylight-saving time is behind UTC.
227 The default is 1 hour ahead of standard time.
228 </LI>
229 <LI>                        `Date/Time,Date/Time' specify when daylight-saving
230 time starts and ends.  The format for a date is
231 `Mm.n.d', which specifies the dth day (0 is Sunday)
232 of the nth week of the mth month, where week 5 means
233 the last such day in the month.  The format for a
234 time is <F>h</F>h<F>:mm[:ss</F>], using a 24-hour clock.</LI>
235 </UL>
236
237 Other Posix string formats are allowed but you don't want
238 to know about them.</LI>
239 </OL>
240 </LI>
241 </OL>
242
243 On the client side, you must make sure that your client's clock and
244 time zone is also set appropriately.  <F>[I don't know how to do this.</F>]
245 Samba traditionally has had many problems dealing with time zones, due
246 to the bizarre ways that Microsoft network protocols handle time
247 zones.  A common symptom is for file timestamps to be off by an hour.
248 To work around the problem, try disconnecting from your Samba server
249 and then reconnecting to it; or upgrade your Samba server to
250 1.9.16alpha10 or later.</P>
251
252
253 <H2><A NAME="ss3.7">3.7 How do I set the printer driver name correctly? </A></H2>
254
255 <P>
256 <A NAME="printer_driver_name"></A> 
257
258 Question:
259 On NT, I opened "Printer Manager" and "Connect to Printer".
260 Enter <F>"\\ptdi270\ps1"</F> in the box of printer. I got the
261 following error message:
262 <BLOCKQUOTE><CODE>
263 <PRE>
264      You do not have sufficient access to your machine
265      to connect to the selected printer, since a driver
266      needs to be installed locally.
267 </PRE>
268 </CODE></BLOCKQUOTE>
269
270 Answer:</P>
271 <P>In the more recent versions of Samba you can now set the "printer
272 driver" in smb.conf. This tells the client what driver to use. For
273 example:
274 <BLOCKQUOTE><CODE>
275 <PRE>
276      printer driver = HP LaserJet 4L
277 </PRE>
278 </CODE></BLOCKQUOTE>
279
280 with this, NT knows to use the right driver. You have to get this string
281 exactly right.</P>
282 <P>To find the exact string to use, you need to get to the dialog box in
283 your client where you select which printer driver to install. The
284 correct strings for all the different printers are shown in a listbox
285 in that dialog box.</P>
286 <P>You could also try setting the driver to NULL like this:
287 <BLOCKQUOTE><CODE>
288 <PRE>
289      printer driver = NULL
290 </PRE>
291 </CODE></BLOCKQUOTE>
292
293 this is effectively what older versions of Samba did, so if that
294 worked for you then give it a go. If this does work then let us know via 
295 <A HREF="mailto:samba-bugs@samba.org">samba-bugs@samba.org</A>,
296 and we'll make it the default. Currently the default is a 0 length
297 string.</P>
298
299
300 <H2><A NAME="ss3.8">3.8 I've applied NT 4.0 SP3, and now I can't access Samba shares, Why?</A></H2>
301
302 <P>
303 <A NAME="NT_SP3_FIX"></A> 
304
305 As of SP3, Microsoft has decided that they will no longer default to 
306 passing clear text passwords over the network.  To enable access to 
307 Samba shares from NT 4.0 SP3, you must do <B>ONE</B> of two things:
308 <OL>
309 <LI> Set the Samba configuration option 'security = user' and implement all of the stuff detailed in 
310 <A HREF="ftp://samba.org/pub/samba/docs/ENCRYPTION.txt">ENCRYPTION.txt</A>.</LI>
311 <LI> Follow Microsoft's directions for setting your NT box to allow plain text passwords. see 
312 <A HREF="http://www.microsoft.com/kb/articles/q166/7/30.htm">Knowledge Base Article Q166730</A></LI>
313 </OL>
314 </P>
315
316
317 <HR>
318 <A HREF="sambafaq-2.html">Previous</A>
319 <A HREF="sambafaq-4.html">Next</A>
320 <A HREF="sambafaq.html#toc3">Table of Contents</A>
321 </BODY>
322 </HTML>