免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 984 | 回复: 0
打印 上一主题 下一主题

Debian5.0下samba配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-21 09:24 |只看该作者 |倒序浏览
安装
apt-get install samba
配置见以下脚本,满足不同权限的需要
cjgs:/etc/samba# cat /etc/samba/smb.conf
#======================= Global Settings =======================
[global]
   workgroup = WORKGROUP
   server string = %h server
#   wins support = no
;   wins server = w.x.y.z
   dns proxy = no
;   name resolve order = lmhosts host wins bcast
   dos charset = cp936
   unix charset = cp936
   display charset = cp936
# Some other performace tuning options
# disable links and symbol links
#    follow symlinks = no
#    wide links = no
# enable some read/write tuning
#    use sendfile = yes
#    read raw = yes
#    write raw = yes
#    aio read size = 16384
#    aio write size = 16384
#    write cache size = 262144
#    max xmit = 65536
#    large readwrite = yes
#    getwd cache = yes
# disable locking, because only 2 share can be written.
#    strict locking = no
#    fake oplocks = yes
#    oplocks = no
#### Networking ####
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes
#### Debugging/Accounting ####
   log file = /var/log/samba/log.%m
   max log size = 1000
#   syslog only = no
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
####### Authentication #######
   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
########## Domains ###########
;   domain logons = yes
;   logon path = \\%N\profiles\%U
;   logon drive = H:
;   logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g
########## Printing ##########
#   load printers = yes
;   printing = bsd
;   printcap name = /etc/printcap
;   printing = cups
;   printcap name = cups
############ Misc ############
;   include = /home/samba/etc/smb.conf.%m
#         SO_RCVBUF=8192 SO_SNDBUF=8192
#   socket options = TCP_NODELAY
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
#   domain master = auto
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash
;   winbind enum groups = yes
;   winbind enum users = yes
;   usershare max shares = 100
#======================= Share Definitions =======================
[menu]
    comment = menu
    path = /home/share/menu
    read only  = yes
    guest ok = yes
    public = yes
[p4]
    comment = p4
    path = /home/share/p4
    read only  = yes
    guest ok = yes
    public = yes
[80G]
    comment = menu
    path = /home/share/80G
    read only  = yes
    guest ok = yes
    public = yes
[start$]
    path = /home/share/start
    read only  = yes
    guest ok = yes
    public = yes
    writable = no
[log$]
    path = /home/share/log
    read only = yes
    guest ok = yes
    write list = @sicent
    public = yes
[netgame$]
    path = /netgame/game
    guest ok = yes
    read only = yes
    public = yes
    write list = @administrator
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/5252/showart_1934357.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP