关于samba配置的问题。

由 lanmaster 在 09-11-2002 11:06 发表:

关于samba配置的问题。

各位老鸟,我在这想提这样的一个问题,我用的是linux7.3.94这个测试版的系统,想在这个系统上做一个samba服务,我在论坛看了很我的贴子都与smb.conf这个配置文件有关,我把我这个配置文件也拿出来大家看看,看直接改那个地方就能做成samba服务希望会的老鸟能多多的帮忙。下面就是那个smb.conf文件的内容 :

This is the main Samba configuration file. You should read the

smb.conf(5) manual page in order to understand the options listed

here. Samba has a huge number of configurable options (perhaps too

many!) most of which are not shown in this example

Any line which starts with a ; (semi-colon) or a # (hash)

is a comment and is ignored. In this example we will use a

for commentry and a ; for parts of the config file that you

may wish to enable

NOTE: Whenever you modify this file you should run the command "testparm"

to check that you have not made any basic syntactic errors.

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

[global]

workgroup = NT-Domain-Name or Workgroup-Name

workgroup = MYGROUP

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.1. 192.168.2. 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

printing = lprng

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 = user

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  
21encrypt passwords = yes   
22  
23smb passwd file = /etc/samba/smbpasswd   
24  
25  
26  
27# The following is needed to keep smbclient from spouting spurious errors   
28  
29# when Samba is built with support for SSL.   
30  
31; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt   
32  
33  
34  
35# The following are needed to allow password changing from Windows to   
36  
37# update the Linux system password also.   
38  
39# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.   
40  
41# NOTE2: You do NOT need these to allow workstations to change only   
42  
43# the encrypted SMB passwords. They allow the Unix password   
44  
45# to be kept in sync with the SMB password.   
46  
47unix password sync = Yes   
48  
49passwd program = /usr/bin/passwd %u   
50  
51passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*   
52  
53  
54  
55# You can use PAM's password change control flag for Samba. If   
56  
57# enabled, then PAM will be used for password changes when requested   
58  
59# by an SMB client instead of the program listed in passwd program.   
60  
61# It should be possible to enable this without changing your passwd   
62  
63# chat</nt-server-name>
Published At
Categories with 服务器类
Tagged with
comments powered by Disqus