「Samba」:修訂間差異
跳至導覽
跳至搜尋
無編輯摘要 |
|||
第13行: | 第13行: | ||
設定會在<code>/etc/samba/smb.conf</code>: | 設定會在<code>/etc/samba/smb.conf</code>: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="ini"> | ||
# | |||
[global] | |||
workgroup = WORKGROUP | |||
server string = %h server (Samba, Ubuntu) | |||
log file = /var/log/samba/log.%m | |||
max log size = 1000 | |||
logging = file | |||
panic action = /usr/share/samba/panic-action %d | |||
server role = standalone server | |||
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 | |||
map to guest = bad user | |||
usershare allow guests = yes | |||
</syntaxhighlight> | </syntaxhighlight> | ||
於 2024年3月6日 (三) 00:49 的修訂
Samba是一個提供SMB協定的軟體。
安裝
大多數的Linux套件都有提供,在Ubuntu下可以用apt安裝:
sudo apt install -y samba; sudo apt clean
設定
設定會在/etc/samba/smb.conf
:
#
[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
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
map to guest = bad user
usershare allow guests = yes
防火牆
使用UFW:
sudo ufw allow from 192.168.0.0/16 to any app Samba
外部連結
- 官方網站 (英文)