samba的配置問題?

由 hzbiz 在 01-16-2004 11:56 发表:

samba的配置問題?

請各位大位是看看這個配置:

#======================= Global Settings =====================================

[global]

workgroup = NT-Domain-Name or Workgroup-Name

workgroup = svt

netbios name = redhat9

server string is the equivalent of the NT Description field

server string = samba server

This option is important for security. It allows you to restrict

connections to machines which are on your local network. The

following example restricts access to two C class networks and

the "loopback" interface. For more examples of the syntax see

the smb.conf man page

; hosts allow = 192.168.0 127.

if you want to automatically load your printer list rather

than setting them up individually then you'll need this

printcap name = /etc/printcap

load printers = yes

It should not be necessary to spell out the print system type unless

yours is non-standard. Currently supported print systems include:

bsd, sysv, plp, lprng, aix, hpux, qnx, cups

printing = cups

Uncomment this if you want a guest account, you must add this to /etc/passwd

otherwise the user "nobody" is used

; guest account = pcguest

this tells Samba to use a separate log file for each machine

that connects

log file = /var/log/samba/%m.log

Put a capping on the size of the log files (in Kb).

max log size = 0

Security mode. Most people will want user level security. See

security_level.txt for details.

security = SHARE

Use password server option only with security = server

The argument list may include:

password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]

or to auto-locate the domain controller/s

password server = *

; password server =

  1<nt-server-name>   
  2  
  3  
  4  
  5# Password Level allows matching of _n_ characters of the password for   
  6  
  7# all combinations of upper and lower case.   
  8  
  9; password level = 8   
 10  
 11; username level = 8   
 12  
 13  
 14  
 15# You may wish to use password encryption. Please read   
 16  
 17# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.   
 18  
 19# Do not enable this option unless you have read those documents   
 20  
 21smb passwd file = /etc/samba/smbpasswd   
 22  
 23  
 24  
 25# The following is needed to keep smbclient from spouting spurious errors   
 26  
 27# when Samba is built with support for SSL.   
 28  
 29; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt   
 30  
 31  
 32  
 33# The following are needed to allow password changing from Windows to   
 34  
 35# update the Linux system password also.   
 36  
 37# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.   
 38  
 39# NOTE2: You do NOT need these to allow workstations to change only   
 40  
 41# the encrypted SMB passwords. They allow the Unix password   
 42  
 43# to be kept in sync with the SMB password.   
 44  
 45unix password sync = Yes   
 46  
 47passwd program = /usr/bin/passwd %u   
 48  
 49passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*   
 50  
 51  
 52  
 53# You can use PAM's password change control flag for Samba. If   
 54  
 55# enabled, then PAM will be used for password changes when requested   
 56  
 57# by an SMB client instead of the program listed in passwd program.   
 58  
 59# It should be possible to enable this without changing your passwd   
 60  
 61# chat parameter for most setups.   
 62  
 63  
 64  
 65pam password change = yes   
 66  
 67  
 68  
 69# Unix users can map to different SMB User names   
 70  
 71; username map = /etc/samba/smbusers   
 72  
 73  
 74  
 75# Using the following line enables you to customise your configuration   
 76  
 77# on a per machine basis. The %m gets replaced with the netbios name   
 78  
 79# of the machine that is connecting   
 80  
 81; include = /etc/samba/smb.conf.%m   
 82  
 83  
 84  
 85# This parameter will control whether or not Samba should obey PAM's   
 86  
 87# account and session management directives. The default behavior is   
 88  
 89# to use PAM for clear text authentication only and to ignore any   
 90  
 91# account or session management. Note that Samba always ignores PAM   
 92  
 93# for authentication in the case of encrypt passwords = yes   
 94  
 95  
 96  
 97obey pam restrictions = yes   
 98  
 99  
100  
101# Most people will find that this option gives better performance.   
102  
103# See speed.txt and the manual pages for details   
104  
105socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192   
106  
107  
108  
109# Configure Samba to use multiple interfaces   
110  
111# If you have multiple network interfaces then you must list them   
112  
113# here. See the man page for details.   
114  
115; interfaces = 192.168.12.2/24 192.168.13.2/24   
116  
117  
118  
119# Configure remote browse list synchronisation here   
120  
121# request announcement to, or browse list sync from:   
122  
123# a specific host or from / to a whole subnet (see below)   
124  
125; remote browse sync = 192.168.3.25 192.168.5.255   
126  
127# Cause this host to announce itself to local subnets here   
128  
129; remote announce = 192.168.1.255 192.168.2.44   
130  
131  
132  
133# Browser Control Options:   
134  
135# set local master to no if you don't want Samba to become a master   
136  
137# browser on your network. Otherwise the normal election rules apply   
138  
139; local master = no   
140  
141  
142  
143# OS Level determines the precedence of this server in master browser   
144  
145# elections. The default value should be reasonable   
146  
147; os level = 33   
148  
149  
150  
151# Domain Master specifies Samba to be the Domain Master Browser. This   
152  
153# allows Samba to collate browse lists between subnets. Don't use this   
154  
155# if you already have a Windows NT domain controller doing this job   
156  
157; domain master = yes   
158  
159  
160  
161# Preferred Master causes Samba to force a local browser election on startup   
162  
163# and gives it a slightly higher chance of winning the election   
164  
165; preferred master = yes   
166  
167  
168  
169# Enable this if you want Samba to be a domain logon server for   
170  
171# Windows95 workstations.   
172  
173; domain logons = yes   
174  
175  
176  
177# if you enable domain logons then you may want a per-machine or   
178  
179# per user logon script   
180  
181# run a specific logon batch file per workstation (machine)   
182  
183; logon script = %m.bat   
184  
185# run a specific logon batch file per username   
186  
187; logon script = %U.bat   
188  
189  
190  
191# Where to store roving profiles (only for Win95 and WinNT)   
192  
193# %L substitutes for this servers netbios name, %U is username   
194  
195# You must uncomment the [Profiles] share below   
196  
197; logon path = \\\%L\Profiles\%U   
198  
199  
200  
201# Windows Internet Name Serving Support Section:   
202  
203# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server   
204  
205; wins support = yes   
206  
207  
208  
209# WINS Server - Tells the NMBD components of Samba to be a WINS Client   
210  
211# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both   
212  
213; wins server = w.x.y.z   
214  
215  
216  
217# WINS Proxy - Tells Samba to answer name resolution queries on   
218  
219# behalf of a non WINS capable client, for this to work there must be   
220  
221# at least one WINS Server on the network. The default is NO.   
222  
223; wins proxy = yes   
224  
225  
226  
227# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names   
228  
229# via DNS nslookups. The built-in default for versions 1.9.17 is yes,   
230  
231# this has been changed in version 1.9.18 to no.   
232  
233dns proxy = no   
234  
235  
236  
237# Case Preservation can be handy - system default is _no_   
238  
239# NOTE: These can be set on a per share basis   
240  
241; preserve case = no   
242  
243; short preserve case = no   
244  
245# Default case is normally upper case for all DOS files   
246  
247; default case = lower   
248  
249# Be very careful with case sensitivity - it can break things!   
250  
251; case sensitive = no   
252  
253  
254  
255#============================ Share Definitions ==============================   
256  
257[homes]   
258  
259comment = Home Directories   
260  
261browseable = no   
262  
263writeable = yes   
264  
265valid users = %S   
266  
267create mode = 0664   
268  
269directory mode = 0775   
270  
271#ftp   
272  
273[ftp]   
274  
275path = /home/ftp   
276  
277guest ok = yes   
278  
279writeable = yes   
280  
281# If you want users samba doesn't recognize to be mapped to a guest user   
282  
283; map to guest = bad user   
284  
285  
286  
287  
288  
289# Un-comment the following and create the netlogon directory for Domain Logons   
290  
291; [netlogon]   
292  
293; comment = Network Logon Service   
294  
295; path = /usr/local/samba/lib/netlogon   
296  
297; guest ok = yes   
298  
299; writable = no   
300  
301; share modes = no   
302  
303  
304  
305  
306  
307# Un-comment the following to provide a specific roving profile share   
308  
309# the default is to use the user's home directory   
310  
311;[Profiles]   
312  
313; path = /usr/local/samba/profiles   
314  
315; browseable = no   
316  
317; guest ok = yes   
318  
319  
320  
321  
322  
323# NOTE: If you have a BSD-style print system there is no need to   
324  
325# specifically define each individual printer   
326  
327[printers]   
328  
329comment =</nt-server-name>
Published At
Categories with 服务器类
Tagged with
comments powered by Disqus