我在 Active Directory 網域環境中工作,並嘗試設定一些 Samba 共用,以便 Windows 用戶端可以存取 SUSE UNIX 伺服器上的某些目錄。
對每個共享的存取需要僅限於特定的 AD 群組。
我的 smb.conf 檔案如下所示,但當導航到 Windows 共用表單時,我收到憑證提示或存取被拒絕訊息。當我使用 \\SERVER_NAME 或 \\IP_ADDRESS 瀏覽到伺服器時,我還在 Samba 日誌中看到略有不同的訊息。
[global]
netbios name = SERVER-NAME
security = domain
realm = MYDOMAIN.ORG.UK
workgroup = MYDOMAIN
password server = *
idmap config * : range = 10000-20000
cups options = raw
kerberos method = secrets and keytab
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
map to guest = Bad User
passdb backend = tdbsam
null passwords = yes
printing = cups
printcap name = cups
printcap cache time = 750
template homedir = /home/%D/%U
template shell = /bin/bash
usershare allow guests = no
winbind refresh tickets = yes
winbind offline logon = yes
winbind cache time = 10
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
log file = /var/log/samba/samba.log
max log size = 1000
log level = 2
[share1]
path = /path/to/share/1
read only = yes
browseable = yes
valid users = @ad-group-for-share-1
[share2]
path = /path/to/share/2
read only = no
browseable = yes
valid users = @ad-group-for-share-2
瀏覽到 \\servername\share1... 時,samba 日誌顯示以下內容
[2019/05/30 11:21:01.182411, 1] ../source3/auth/token_util.c:431(add_local_groups)
SID S-1-5-21-2037406089-871956902-1971066577-68326 -> getpwuid(10010) failed
[2019/05/30 11:21:01.182460, 1] ../source3/auth/auth_generic.c:172(auth3_generate_session_info_pac)
Failed to map kerberos pac to server info (NT_STATUS_UNSUCCESSFUL)
[2019/05/30 11:21:01.203035, 3] ../source3/lib/util_procid.c:54(pid_to_procid)
pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
瀏覽到 \\ip-address\share1 時,Samba 日誌顯示以下內容
[2019/05/30 11:22:01.416559, 2] ../source3/auth/auth.c:305(auth_check_ntlm_password)
check_ntlm_password: authentication for user [MY-USERNAMER] -> [MY-USERNAME] -> [my-username] succeeded
[2019/05/30 11:22:01.417038, 1] ../source3/auth/token_util.c:431(add_local_groups)
SID S-1-5-21-2037406089-871956902-1971066577-68326 -> getpwuid(10010) failed
[2019/05/30 11:22:01.417425, 1] ../source3/auth/token_util.c:431(add_local_groups)
SID S-1-5-21-2037406089-871956902-1971066577-68326 -> getpwuid(10010) failed
[2019/05/30 11:22:01.436657, 3] ../source3/lib/util_procid.c:54(pid_to_procid)
pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
我缺什麼?我該如何解決這個問題?需要做什麼才能讓 Windows 用戶端存取這些共用?