我正在 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 客户端访问这些共享?