要配置 Samba 服务:
systemctl start smb
systemctl enable smb
systemctl start nmb
systemctl enable nmb
systemctl start smbd
systemctl enable smbd
systemctl start nmbd
systemctl enable nmbd
[全局]
netbios name = <服务器的 NetBIOS 名称(hostname)>
workgroup = <Active Directory 域的 NetBIOS 名称>
password server = <Active Directory 域控制器的 DNS 名称>
realm = <大写的 Active Directory 域名>
security = ads
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind use default domain = no
winbind request timeout = 300
如果服务器的域名 (hostname) 长度超过 15 个字符,则必须指定最多为 15 个字符的缩短名称(别名)为netbios name。
net ads join -U <domain administrator>
您将被提示输入域管理员的密码或有域管理员权限的用户的密码。
托管 Squid 服务的服务器应该被添加到 Active Directory 域。
net ads testjoin
如果托管 Squid 服务的服务器已被添加到 Active Directory 域,控制台中会显示 Join is OK。
systemctl restart smb
systemctl restart nmb
systemctl restart smbd
systemctl restart nmbd
如果您看到 "ERROR: failed to setup guest info", 您必须配置访客组的映射。为此,请运行命令 net groupmap add sid=S-1-5-32-546 unixgroup=nobody type=builtin
systemctl start winbind
systemctl enable winbind
usermod -a -G winbindd_priv proxy
Samba 配置将完成。继续检查 Samba 设置。
页面顶端