尝试使用 Cobbler 镜像 Windows VM 时出现 Samba“NT_STATUS_ACCESS_DENIED”错误

尝试使用 Cobbler 镜像 Windows VM 时出现 Samba“NT_STATUS_ACCESS_DENIED”错误

寻求有关 Fedora 38 上的 Samba 的一些帮助。

我们目前有一个 Cobbler v3.3.3 服务器用于测试目的。

我们已经配置了 Cobbler,并按照以下说明导入了 Windows 发行版:https://github.com/cobbler/cobbler/blob/release33/docs/user-guide/wingen.rst#booting-from-bios-pxe-via-grub2-grub0-and-wimboot-tftphttp使用 PXE 和 BIOS 模式。

我们可以让第一阶段的启动工作,加载 winpe.wim 文件。但是,当它到达尝试映射网络驱动器的阶段时,我们收到以下 Samba 错误:

[2023/10/30 16:25:21.250168, 10, pid=6143, effective(1001, 1001), real(1001, 0), class=smb2] ../../source3/smbd/smb2_create.c:748(smbd_smb2_create_send)
  smbd_smb2_create_send: name [win10-x86_64\sources\setup.exe]
[2023/10/30 16:25:21.250281, 10, pid=6143, effective(1001, 1001), real(1001, 0), class=smb2] ../../source3/smbd/smb2_create.c:864(smbd_smb2_create_send)
  smbd_smb2_create_send: open execution phase
[2023/10/30 16:25:21.250720,  3, pid=6143, effective(1001, 1001), real(1001, 0), class=smb2] ../../source3/smbd/smb2_server.c:3962(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:340
[2023/10/30 16:25:21.250859, 10, pid=6143, effective(1001, 1001), real(1001, 0), class=smb2] ../../source3/smbd/smb2_server.c:3847(smbd_smb2_request_done_ex)
  smbd_smb2_request_done_ex: mid [20] idx[1] status[NT_STATUS_ACCESS_DENIED] body[8] dyn[yes:1] at ../../source3/smbd/smb2_server.c:4013

我们尝试了来自各个论坛的多个建议,包括设置具有 samba 密码的用户并在执行 cobbler sync 命令之前在 Cobbler 中的 startnet.template 文件中包含用户 ID 和密码。

以下是当前 Cobbler 文档推荐的基本 Samba 配置:

[DISTRO]
        path = /var/www/cobbler
        guest ok = yes
        browseable = yes
        public = yes
        writeable = no
        printable = no

这些是在firewalld中启用的服务:

cockpit dhcpv6-client http https samba ssh tftp

任何有关 Samba 和此问题的帮助,或有设置 Cobbler 与 Windows 发行版配合使用经验的人都将不胜感激,因为我是 Samba 新手,而我的同事也很长时间没有接触过 Samba。

如果需要任何其他信息,请告诉我。

答案1

我在 Reddit 上找到了答案。这需要添加到 smb.conf 中的 DISTRO smb 共享中:

acl allow execute always = yes

相关内容