翻译smb.conf。方便大家设置

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

翻译smb.conf。方便大家设置

#1

帖子 eexpress » 2005-10-19 23:43

#======================= 全局设置 ======================
[global]
# 参照论坛,显示中文的编码设置
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936

## Browsing/Identification ###

# 改成你所位于的工作组/NT域名。
workgroup = MSHOME

# 相当于NT描述字段的服务器名字(本机)%h会扩展成登录的用户名
server string = %h server (Samba, Ubuntu)

# WINS支持
; wins support = no
# 指定WINS服务器地址。
; wins server = w.x.y.z
# 防止通过DNS搜索NetBIOS。
dns proxy = no
# 解析主机名字时(翻译成IP地址),使用的服务和次序。
; name resolve order = lmhosts host wins bcast

# 指定记录文件(LOG)。%m扩展为机器名。
log file = /var/log/samba/log.%m
# 记录文件长度。单位k。
max log size = 1000
# 设置为yes,记录将写入系统记录(syslog)文件。
; syslog only = no
# 希望在syslog记录多少。0就是全部都记录到/var/log/samba/log.{smbd,nmbd}。
syslog = 0
# 出错的应急处理:发邮件给管理员。
panic action = /usr/share/samba/panic-action %d

####### 认证 #######
# "security = user"是个好办法。每个想要操作服务器的用户都需要一个Unix帐号。
# 具体的参照/usr/share/doc/samba-doc/htmldocs/ServerType.html。
; security = user
# 如果想要加密的密码。查看smb.conf(5)。
encrypt passwords = true
# 如果使用了加密的密码,Samba需要知道所使用的密码数据库的类型。
passdb backend = tdbsam guest
obey pam restrictions = yes
# 设置guest无效
; guest account = nobody
# 设置root无效?
invalid users = root
# 这个布尔参数控制密码库中SMB密码改变时,Samba是否需要尝试使用SMB密码同步Unix密码。?
; unix password sync = no
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for
# sending the correct chat script for the passwd program in Debian Potato).
# 没懂,不好翻译。
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no

########## 打印 ##########
# 如果需要自动加载打印机列表,而不是单独启动,就设置这个。
; load printers = yes
崽崽有事了。明天接。
● 鸣学
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#2

帖子 eexpress » 2005-10-20 16:05

########## 打印 ##########
# 如果需要自动加载打印机列表,而不是单独启动,就设置这个。
; load printers = yes
# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap
# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @ntadmin


######## 文件共享 ########

# 名字矫正配置
; preserve case = yes
; short preserve case = yes


######## 杂项 ###########

# 下面的行可以让你配置每个特定的机器,%m将被每台联入的机器的netbios名字代替。
; include = /home/samba/etc/smb.conf.%m

# 大多数人可以使用这个配置取得更好的效果。适合于Linex系统。
# 具体参照smb.conf(5)和/usr/share/doc/samba-doc/htmldocs/speed.html。
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# 下面的参数对于安装了linpopup包的情况有用。帮助samba和linpopup的维护人员可以更加方便的完成安装配置。
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# 指定是否作为域名管理。机器作为第二登录服务器时选择no,否则请使用缺省配置。
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

#=========== 共享定义 ===========
[homes]
comment = Home Directories
browseable = no
# 缺省的主用户目录是只读的。设置为yes将变为可写入。
writable = no
# 建立文件的掩码。0700表示只有文件所有者才能操作。如果想要同组的用户可以读写,可以设置为0775。
# 建立目录的掩码。
create mask = 0700
directory mask = 0700
# 取消下面的注释,将为域名登录产生网络登录目录。(首先需要配置Samba作为域名控制)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
#打印
[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700
# Windows客户端将把这个共享名视为可以下载的打印驱动。
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# 如果要允许Windows的打印驱动进行远程管理,取消注释。
# 使用你位于admin成员组中的名字代替'ntadmin'。
; write list = root, @ntadmin

# 共享你的光驱。
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# 以下2个参数设置当别人要共享你的光驱时,让系统自动加载光驱。
# 因此在 /etc/fstab 文件中必须包含以下项目。
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
# 光驱在共享完成后,会自动卸载。
# 如果你不想系统自动加载/卸载,可以自己在此以前先加载。
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
● 鸣学
头像
leal
帖子: 1119
注册时间: 2005-08-29 14:49
来自: 杭州
联系:

#3

帖子 leal » 2005-10-20 19:48

辛苦 辛苦了
用心×恒 | 豆瓣 | 门户 | Blog
头像
cks
帖子: 252
注册时间: 2005-10-02 13:32
联系:

#4

帖子 cks » 2005-10-22 8:58

好人呐
回复