16.7 Samba 服务器
Samba 简介
安装 Samba
# pkg install samba420# cd /usr/ports/net/samba420/
# make install clean查看安装信息
# pkg info -D samba420
samba420-4.20.7_4:
On install: # 安装提示:
How to start: http://wiki.samba.org/index.php/Samba4/HOWTO
如何启动:参见官方指南
* Your configuration is: /usr/local/etc/smb4.conf
* 你的配置文件路径是:/usr/local/etc/smb4.conf
* All the relevant databases are under: /var/db/samba4
* 所有相关数据库位于:/var/db/samba4
* All the logs are under: /var/log/samba4
* 所有日志位于:/var/log/samba4
* Provisioning script is: /usr/local/bin/samba-tool
* # 初始化脚本路径为:/usr/local/bin/samba-tool
For the working DNS updates you will need to either build dns/bind9*
# 若要正常使用 DNS 更新功能,需要:
with the enabled GSSAPI(GSSAPI_MIT5 is recommended) or install
# 要么构建启用了 GSSAPI(推荐 GSSAPI_MIT5)的 dns/bind9*,
dns/samba-nsupdate package, which is preconfigured with such a support.
# 要么安装 dns/samba-nsupdate 包,它已预配置了所需支持。
You will need to specify location of the 'nsupdate' command in the
smb4.conf file:
# 你需要在 smb4.conf 中指定 nsupdate 命令的位置:
nsupdate command = /usr/local/bin/samba-nsupdate -g # 示例配置
For additional documentation check: https://wiki.samba.org/index.php/User_Documentation
# 更多文档请查阅:
Port related bug reports can go to the https://gitlab.com/samba-freebsd/ports/-/issues or
# 和 FreeBSD port 相关的问题请提交到:
to the FreeBSD Bugzilla https://bugs.freebsd.org/
# 所有 Samba 本身相关的问题请提交到:
All Samba related bug reports should go to the: https://bugzilla.samba.org/ 配置 samba



将 Samba 设置为域成员
配置静态 IP 地址
配置主机名
配置 DNS
修改 /etc/sysctl.conf 文件
/etc/sysctl.conf 文件创建 /etc/krb5.conf 文件
/etc/krb5.conf 文件修改 /etc/nsswitch.conf 文件
/etc/nsswitch.conf 文件创建 /usr/local/etc/smb4.conf 文件
/usr/local/etc/smb4.conf 文件将 Samba 加入域
设置 Samba 启动并开机自启动
测试 Kerberos
测试 Winbind
创建共享文件夹
故障排除与未竟事宜
最后更新于