JHT ==> Been playing again! Whooooooo!
[samba.git] / docs / textdocs / HINTS.txt
1 Contributor:    Many
2 Updated:        Not for a long time!
3
4 Subject:        A collection of hints
5 Status:         May be useful information but NOT current
6 ===============================================================================
7
8 Here are some random hints that you may find useful. These really
9 should be incorporated in the main docs someday.
10
11
12 ----------------------
13 HINT: Always test your smb.conf with testparm before using it
14
15 If your smb.conf file is invalid then samba will fail to load. Run
16 testparm over it before you install it just to make sure there aren't
17 any basic syntax or logical errors.
18
19
20 ----------------------
21 HINT: Try printing with smbclient first
22
23 If you have problems printing, test with smbclient first. Just connect using 
24 "smbclient '\\server\printer' -P" and use the "print" command.
25
26 Once this works, you know that Samba is setup correctly for printing,
27 and you should be able to get it to work from your PCs.
28
29 This particularly helps in getting the "print command" right.
30
31
32 ----------------------
33 HINT: Mount cdroms with conv=binary
34
35 Some OSes (notably Linux) default to auto detection of file type on
36 cdroms and do cr/lf translation. This is a very bad idea when use with
37 Samba. It causes all sorts of stuff ups.
38
39 To overcome this problem use conv=binary when mounting the cdrom
40 before exporting it with Samba.
41
42
43 ----------------------
44 HINT: Convert between unix and dos text formats
45
46 Jim barry has written an excellent drag-and-drop cr/lf converter for
47 windows. Just drag your file onto the icon and it converts the file.
48
49 Get it from
50 ftp://samba.anu.edu.au/pub/samba/contributed/fixcrlf.zip
51
52 ---------------------- 
53 HINT: Use the "username map" option
54
55 If the usernames used on your PCs don't match those used on the unix
56 server then you will find the "username map" option useful.
57
58 -----------------------
59 HINT: Use "security = user" in [global]
60
61 If you have the same usernames on the unix box and the PCs or have
62 mapped them with the "username map" option then choose "security =
63 user" in the [global] section of smb.conf.
64
65 This will mean your password is checked only when you first connect,
66 and subsequent connections to printers, disks etc will go more
67 smoothly and much faster.
68
69 The main problem with "security = user" if you use WfWg is that you
70 will ONLY be able to connect as the username that you log into WfWg
71 with. This is because WfWg silently ignores the password field in the
72 connect drive dialog box if the server is in user security mode.
73
74 ------------------------
75 HINT: Make your printers not "guest ok"
76
77 If your printers are not "guest ok" and you are using "security =
78 user" and have matching unix and PC usernames then you will attach to
79 the printer without trouble as your own username. This will mean you
80 will be able to delete print jobs (in 1.8.06 and above) and printer
81 accounting will be possible.
82
83
84 -----------------------
85 HINT: Use a sensible "guest" account
86
87 Even if all your services are not available to "guest" you will need a
88 guest account. This is because the browsing is done as guest. In many
89 cases setting "guest account = ftp" will do the trick. Using the
90 default guest account or "guest account = nobody" will give problems on
91 many unixes. If in doubt create another account with minimal
92 privilages and use it instead. Your users don't need to know the
93 password of the guest account.
94
95
96 -----------------------
97 HINT: Use the latest TCP/IP stack from microsoft if you use Windows
98 for workgroups.
99
100 The early TCP/IP stacks had lots of bugs.
101
102 Microsoft has released an incremental upgrade to their TCP/IP 32-Bit
103 VxD drivers.  The latest release can be found on their ftp site at
104 ftp.microsoft.com, located in /peropsys/windows/public/tcpip/wfwt32.exe.
105 There is an update.txt file there that describes the problems that were
106 fixed.  New files include WINSOCK.DLL, TELNET.EXE, WSOCK.386, VNBT.386,
107 WSTCP.386, TRACERT.EXE, NETSTAT.EXE, and NBTSTAT.EXE.
108
109
110 -----------------------
111 HINT: nmbd can act as a "WINS" server
112
113 By default SMB clients use broadcasts to find shares. Recent clients
114 (such as WfWg) can use a "wins" server instead, whcih reduces your
115 broadcast traffic and allows you to find names across routers.
116
117 Just point your WfWg, Win95 and NT clients at the Samba box in the WINS option.
118
119 Note: nmbd does not support all WINS operations. Anyone out there have
120 a spec they could send me?
121
122 -----------------------
123 HINT: you may need to delete your .pwl files when you change password.
124
125 WfWg does a lousy job with passwords. I find that if I change my
126 password on either the unix box or the PC the safest thing to do is to
127 delete the .pwl files in the windows directory. The PC will complain about not finding the files, but will soon get over it, allowing you to enter the new password.
128
129 If you don't do this you may find that WfWg remembers and uses the old
130 password, even if you told it a new one.
131
132 Often WfWg will totally ignore a password you give it in a dialog box.
133
134 ----------------------
135 HINT: Using MS Access
136
137 Here are some notes on running MS-Access on a Samba drive from Stefan 
138 Kjellberg <stefank@esi.com.au>
139
140 1. Opening a database in 'exclusive' mode does NOT work. Samba ignores
141    r/w/share modes on file open.
142
143 2. Make sure that you open the database as 'shared' and to 'lock modified
144    records'
145
146 3. Of course locking must be enabled for the particular share (smb.conf)
147
148
149 ---------------------
150 HINT: password cacheing in WfWg
151
152 Here is a hint from michael@ecel.uwa.edu.au (Michael Simmons):
153
154 In case people where not aware. There is a program call admincfg.exe
155 on the last disk (disk 8) of the WFW 3.11 disk set.  To install it
156 type EXPAND A:\ADMINCFG.EX_ C:\WINDOWS\ADMINCFG.EXE Then add an icon
157 for it via the "Progam Manager" "New" Menu.  This program allows you
158 to control how WFW handles passwords.  ie disable Password Caching etc
159 for use with "security = user"
160
161
162 --------------------
163 HINT: file descriptor limits
164
165 If you have problems with the limits on the number of open files you
166 can edit local.h to fix it.
167
168 --------------------
169 HINT: HPUX initgroups() problem
170
171 here is a hint from Frank Wales [frank@arcglade.demon.co.uk]:
172
173 HP's implementation of supplementary groups is, er, non-standard (for
174 hysterical reasons).  There are two group files, /etc/group and
175 /etc/logingroup; the system maps UIDs to numbers using the former, but
176 initgroups() reads the latter.  Most system admins who know the ropes
177 symlink /etc/group to /etc/logingroup (hard link doesn't work for reasons
178 too stupid to go into here).  initgroups() will complain if one of the
179 groups you're in in /etc/logingroup has what it considers to be an invalid
180 ID, which means outside the range [0..UID_MAX], where UID_MAX is (I think)
181 60000 currently on HP-UX.  This precludes -2 and 65534, the usual 'nobody'
182 GIDs.
183
184 Perhaps you could suggest to users that, if they encounter this problem,
185 they make sure that the programs that are failing to initgroups() be
186 run as users not in any groups with GIDs outside the allowed range.
187
188 This is documented in the HP manual pages under setgroups(2) and passwd(4).
189
190
191 ---------------------
192 HINT: Patch your SCO system
193
194 If you run SCO Unix then you may need to get important TCP/IP patches
195 for Samba to work correctly. Try 
196
197 Paul_Davis@mindlink.bc.ca writes:
198
199   I was having problems with Accpac using 1.9.02 on SCO Unix.  One
200   posting function reported corrupted data.  After installing uod385a,
201   the problem went away (a restore from backup and then another
202   run-thru).
203
204   It appears that the uod385a update for SCO may be fairly important for
205   a lot of different DOS and Windows software under Samba.
206
207   uod385a can be found at ftp.sco.com /SLS/uod385a.Z and uod385a.ltr.Z.
208
209