要配置 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 設定。
頁面頂端