欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

SUSE12SP3-Samba配置

程序员文章站 2022-08-19 21:46:45
简介 samba官网:https://www.samba.org/ *: https://zh.wikipedia.org/wiki/Samba Samba,是种用来让UNIX系列的操作系统与微软Windows操作系统的SMB/CIFS(Server Message Block/Common ......

简介

samba官网:

*:
https://zh.wikipedia.org/wiki/samba

samba,是种用来让unix系列的操作系统与微软windows操作系统的smb/cifs(server message block/common internet file system)网络协议做链接的*软件。第三版不仅可访问及分享smb的文件夹及打印机,本身还可以集成入windows server的网域,扮演为网域控制站(domain controller)以及加入active directory成员。简而言之,此软件在windows与unix系列操作系统之间搭起一座桥梁,让两者的资源可互通有无。

安装

suse12sp3无需安装,系统默认安装好了。

配置

 [global] # 全局配置
    workgroup = workgroup
   dns proxy = no
   log file = /var/log/samba/%m.log
   max log size = 1000
   client max protocol = nt1
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *new*unix*password* %n\n *retype*new*unix*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
   pam password change = yes
   map to guest = bad password
   usershare allow guests = yes
   name resolve order = lmhosts bcast host wins
   security = user
   guest account = nobody
   usershare path = /var/lib/samba/usershare
   usershare max shares = 100
   usershare owner only = yes
   force create mode = 0070
   force directory mode = 0070
[homes]
    comment = home directories
    valid users = %s, %d%w%s
    browseable = no
    read only = no
    inherit acls = yes
[allspark]
    comment = public
    path = /home/allspark/allspark
    public = yes
    browseable = yes
    writable = yes
    available = yes
    admin users = root
    create mask = 0700
    directory mask = 0700

开机自启 sudo systemctl enable smb.service

开机自启 sudo systemctl enable nmb.service

权限
chmod 777 -r /home/allspark/allspark/

备份
cp smb.conf smb.confbak

重启
service smb restart
service nmb restart