簡介 samba官網:https://www.samba.org/ 維基百科: https://zh.wikipedia.org/wiki/Samba Samba,是種用來讓UNIX系列的操作系統與微軟Windows操作系統的SMB/CIFS(Server Message Block/Common ...
簡介
samba官網:https://www.samba.org/
維基百科:
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