无法从 Windows(Samba)访问 ubuntu 的文件

无法从 Windows(Samba)访问 ubuntu 的文件

我需要为两台机器设置 samba-share:

  1. Ubuntu:xx27.48
  2. Windows:xx16.218

这两台 PC 是在 AWS 上创建的,位于同一个 VPC 和同一个子网内。
我成功地telnet x.x.27.48 445从 Windows 上安装了 Ubuntu 机器。
我已将 Ubuntu 机器设置为接受端口 445 上的连接,然后0.0.0.0/0
在我的 ubuntu 上安装了 samba本指南,但我尝试通过 Windows 访问文件时失败了

  1. \\x.x.27.48\linuxconfig
  2. \\x.x.27.48
  3. \\x.x.27.48\public
  4. \\my-ubuntu-name\public
  5. \\my-ubuntu-name\linuxconfig
  6. \\my-ubuntu-name

我检查并尝试了askubuntu类似的解决方案chcon,但没有帮助。问题是什么?我如何将 Samba 文件夹共享给 Windows?

这是错误图像: 从 Windows 访问时出错

这是我运行时的控制台输出sudo systemctl status smbd

$ sudo systemctl status smbd
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-03-03 10:06:36 UTC; 10min ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 16862 (smbd)
   Status: "smbd: ready to serve connections..."
    Tasks: 4 (limit: 1152)
   CGroup: /system.slice/smbd.service
           ├─16862 /usr/sbin/smbd --foreground --no-process-group
           ├─16881 /usr/sbin/smbd --foreground --no-process-group
           ├─16882 /usr/sbin/smbd --foreground --no-process-group
           └─16888 /usr/sbin/smbd --foreground --no-process-group

Mar 03 10:09:25 ip-172-31-27-48 smbd[16930]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:09:25 ip-172-31-27-48 smbd[16931]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:09:25 ip-172-31-27-48 smbd[16932]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:09:25 ip-172-31-27-48 smbd[16933]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:09:25 ip-172-31-27-48 smbd[16934]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:09:25 ip-172-31-27-48 smbd[16935]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:11:21 ip-172-31-27-48 smbd[16947]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:11:25 ip-172-31-27-48 smbd[16948]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:13:33 ip-172-31-27-48 smbd[16953]: pam_unix(samba:session): session closed for user nobody
Mar 03 10:14:35 ip-172-31-27-48 smbd[16954]: pam_unix(samba:session): session closed for user nobody

如果需要的话,这是控制台日志smbclient -L localhost

$ smbclient -L localhost
WARNING: The "syslog" option is deprecated
Enter WORKGROUP\ubuntu's password:

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        homes           Disk      Home Directories
        truedata        Disk      test share folder qua samba de access tu windows
        public          Disk      public anonymous access
        IPC$            IPC       IPC Service (ip-172-31-27-48 server (Samba, Ubuntu))
        ubuntu          Disk      Home Directories
Reconnecting with SMB1 for workgroup listing.

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

        Workgroup            Master
        ---------            -------
        WORKGROUP            IP-172-31-27-48

相关内容