ubuntu 22.04 上的 samba:Windows 无法访问 [已关闭]

samba on ubuntu 22.04: Windows cannot access [closed]

提问人:shedmeister 提问时间:11/17/2023 更新时间:11/17/2023 访问量:34

问:


这个问题似乎与特定的编程问题、软件算法或程序员主要使用的软件工具无关。如果您认为该问题在另一个 Stack Exchange 站点上是主题,您可以发表评论以解释在哪里可以回答该问题。

7天前关闭。

在 Ubuntu 上安装 samba 22.04.03 LTS.我已经在以前的几个 linux 发行版上这样做了。在最后几个中,我使用名为“system-config-samba”的 GUI 进行了用户设置,该 GUI 现在似乎已被弃用。因此,这次将自己添加为 samba 用户,我只是做了“sudo smbpasswd -a ”并输入了我的常规密码作为我的 samba 密码。它说“添加了用户”。还尝试了“udo smbpasswd -e”的笑容。我还有一台 Windows 10 PC、一台 Mac Mini 和一台 Ubuntu 18.04 机器。Mac 和 Windows 可以查看并连接到彼此和 Ubuntu 18.04 计算机,但都无法连接到 22.04 计算机,尽管计算机确实显示在它们的网络列表中。它甚至没有提示我输入凭据,只是说“无法访问”或在 Mac 上“连接失败”(尝试 15-30 秒后)。

以下是 18.04 配置和 22.04 配置之间的一些差异:

  1. 18.04 在 /etc/samba 中有一个“smbusers”文件,22.04 没有。
  2. “smbclient -NL 本地主机” 在 18.04:
WARNING: The "syslog" option is deprecated
Anonymous login successful

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        tftpboot        Disk
        opt             Disk      Opt mount
        backup          Disk
        IPC$            IPC       IPC Service (erolux server (Samba, Ubuntu))
        Brother_HL_L2360D_series Printer   Brother_HL_L2360D_series
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        WORKGROUP            <windowsPC>

4月22日:

Anonymous login successful

        Sharename       Type      Comment
        ---------       ----      -------
        homes           Disk      Home Directories
        print$          Disk      Printer Drivers
        backup          Disk      
        jlf             Disk      
        public          Disk      public anonymous access
        smbshare        Disk      
        IPC$            IPC       IPC Service (erolux2 server (Samba, Ubuntu))
        Brother_HL_L2360D_series Printer   Brother_HL_L2360D_series
SMB1 disabled -- no workgroup available

“SMB1 禁用”令人担忧,我在谷歌上搜索了几个小时,但没有找到如何修复它。

我将提供 testparm 输出 (22.04),但我已经尝试了无数种 smb.conf 设置的变体:

erolux2> testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        log file = /var/log/samba/log.%m
        logging = file
        map to guest = Bad User
        max log size = 1000
        obey pam restrictions = Yes
        pam password change = Yes
        panic action = /usr/share/samba/panic-action %d
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        passwd program = /usr/bin/passwd %u
        server role = standalone server
        server string = %h server (Samba, Ubuntu)
        unix password sync = Yes
        usershare allow guests = Yes
        idmap config * : backend = tdb

[printers]
        browseable = No
        comment = All Printers
        create mask = 0700
        path = /var/spool/samba
        printable = Yes


[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers


[homes]
        comment = Home Directories
        create mask = 0700
        directory mask = 0700
        read only = No
        valid users = %S


[public]
        comment = public anonymous access
        create mask = 0660
        directory mask = 0771
        guest ok = Yes
        path = /var/samba/
        read only = No

我试过:

  • 安装更多 Samba 软件包,包括 samba-common、smbclient 和 cifs-utils
  • 以任何可以想象的方式调整 smb.conf,每次迭代之间使用“sudo systemctl restart smbd”
  • 谷歌搜索了几个小时,包括 reddit 上的一个帖子,说他按照“Ubuntu 的官方说明”修复了它,但我从未找到过。
桑巴 Ubuntu 22.04

评论

1赞 jmoerdyk 11/17/2023
由于这不是帮助中心定义的范围内的编程问题,因此与 Stack Overflow 无关。对于一般的操作系统或应用程序支持,您可以在Ask Ubuntu,Unix和Linux超级用户上找到帮助,但请务必遵循其内容指南,以确保问题的主题。

答: 暂无答案