我最近从 16.04 LTS 升级到了 20.04 LTS,现在我无法从 Windows/10 连接到 Ubuntu。
我确实有一个来自 Windows/10 的活动连接:
但是,我无法连接任何其他人:
C:\Users\rene>net use g: \\tristram\games
System error 53 has occurred.
The network path was not found.
C:\Users\rene>
smb.conf中的共享定义:
[Games]
comment = René's games on Tristram
path = /usr/games
readonly = no
writeable = yes
browseable = yes
follow symlinks = yes
veto files = /.*/*~/*.desktop/
create mask = 0740
directory mask = 0740
guest ok = no
valid users = rene
使用 smbclient 查看服务器,我得到以下信息:
rene@TRISTRAM:~$ sudo smbclient -L tristram -d 4
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
doing parameter netbios name = TRISTRAM
doing parameter workgroup = DALLE-FAMILY
doing parameter local master = yes
doing parameter preferred master = yes
doing parameter os level = 65
doing parameter server string = %h server (Samba , Ubuntu 20.04 LTS)
doing parameter interfaces = eno1
doing parameter bind interfaces only = yes
doing parameter log file = /var/log/samba/log.%m
doing parameter log level = 3 passdb:5 auth:5
doing parameter max log size = 4096
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter server role = standalone server
doing parameter obey pam restrictions = yes
doing parameter ntlm auth = ntlmv1-permitted
doing parameter unix password sync = yes
doing parameter passwd program = /usr/bin/passwd %u
doing parameter passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
doing parameter pam password change = no
doing parameter map to guest = bad user
doing parameter usershare allow guests = no
pm_process() returned Yes
added interface eno1 ip=192.168.2.65 bcast=192.168.2.255 netmask=255.255.255.0
Client started (version 4.11.6-Ubuntu).
Connecting to 192.168.2.65 at port 445
Connecting to 192.168.2.65 at port 139
do_connect: Connection to tristram failed (Error NT_STATUS_CONNECTION_REFUSED)
rene@TRISTRAM:~$ sudo ufw status
Status: inactive
rene@TRISTRAM:~$ sudo systemctl status smbd
● smbd.service - LSB: Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; generated)
Active: active (exited) since Tue 2021-07-06 15:20:59 EDT; 9min ago
Docs: man:systemd-sysv-generator(8)
Process: 6579 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS)
Jul 06 15:20:59 TRISTRAM systemd[1]: Starting LSB: Samba SMB/CIFS daemon (smbd)...
Jul 06 15:20:59 TRISTRAM systemd[1]: Started LSB: Samba SMB/CIFS daemon (smbd).
rene@TRISTRAM:~$
而从服务器到客户端没有问题:
rene@TRISTRAM:~$ smbclient -L nancy
Enter DALLE-FAMILY\rene's password:
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
D$ Disk Default share
IPC$ IPC Remote IPC
Windows-Games Disk
Windows-Rene Disk
SMB1 disabled -- no workgroup available
rene@TRISTRAM:~$smbclient -L TRISTRAM
do_connect: Connection to TRISTRAM failed (Error NT_STATUS_CONNECTION_REFUSED)
rene@TRISTRAM:~$