我正在尝试再次启用我的 samba 共享。我调整了服务器上不同安装的各种配置(Ubuntu 软件包、源安装和 Docker 映像 dperson/samba),但这些问题永远无法解决。但是,我首先要确保同一子网中的连接(从 192.168.178.34 到 192.168.178.26)完全正常。SSH 连接没有问题。据我所知,我没有安装防火墙,但你永远不知道。
哪些是适合smbclient -L 192.168.178.26 -d 256 -U WORKGROUP\user -m SMB3
在客户端运行的步骤?我尝试了所有可能的值-m SMB[1-4]
、不同的用户以及省略WORKGROUP\
。当前输出是
Processing section "[global]"
doing parameter workgroup = WORKGROUP
doing parameter server string = %h server (Samba, Ubuntu)
doing parameter log file = /var/log/samba/log.%m
doing parameter max log size = 1000
doing parameter logging = file
doing parameter panic action = /usr/share/samba/panic-action %d
doing parameter server role = standalone server
doing parameter obey pam restrictions = yes
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 = yes
doing parameter map to guest = bad user
doing parameter usershare allow guests = yes
pm_process() returned Yes
lp_servicenumber: couldn't find homes
added interface enx00e07cc862a1 ip=2001:16b8:4244:c900:85e9:30b3:7608:5535 bcast= netmask=ffff:ffff:ffff:ffff::
added interface enx00e07cc862a1 ip=2001:16b8:4244:c900:e4c2:24cd:7963:2a76 bcast= netmask=ffff:ffff:ffff:ffff::
added interface docker0 ip=172.17.0.1 bcast=172.17.255.255 netmask=255.255.0.0
added interface br-54944669ea0b ip=172.25.0.1 bcast=172.25.255.255 netmask=255.255.0.0
added interface virbr1 ip=192.168.42.1 bcast=192.168.42.255 netmask=255.255.255.0
added interface virbr0 ip=192.168.122.1 bcast=192.168.122.255 netmask=255.255.255.0
added interface enx00e07cc862a1 ip=192.168.178.34 bcast=192.168.178.255 netmask=255.255.255.0
Netbios name list:-
my_netbios_names[0]="USER-LENOVO-"
Client started (version 4.11.6-Ubuntu).
samba_tevent: Added timed event "tevent_req_timedout": 0x557790278ab0
Connecting to 192.168.178.26 at port 445
samba_tevent: Added timed event "tevent_req_timedout": 0x55779028f300
samba_tevent: Added timed event "tevent_req_timedout": 0x55779027b070
samba_tevent: Added timed event "tevent_req_timedout": 0x557790276e80
samba_tevent: Running timer event 0x55779027b070 "tevent_req_timedout"
samba_tevent: Destroying timer event 0x55779027b070 "tevent_req_timedout"
convert_string_handle: E2BIG: convert_string(UTF-8,CP850): srclen=28 destlen=16 error: No more room
samba_tevent: Added timed event "tevent_req_timedout": 0x55779028fe90
Connecting to 192.168.178.26 at port 139
samba_tevent: Added timed event "tevent_req_timedout": 0x557790290440
samba_tevent: Running timer event 0x55779028f300 "tevent_req_timedout"
samba_tevent: Destroying timer event 0x55779028f300 "tevent_req_timedout"
samba_tevent: Schedule immediate event "tevent_req_trigger": 0x557790278ed0
samba_tevent: Added timed event "tevent_req_timedout": 0x5577902790b0
samba_tevent: Run immediate event "tevent_req_trigger": 0x557790278ed0
samba_tevent: Destroying timer event 0x5577902790b0 "tevent_req_timedout"
samba_tevent: Destroying timer event 0x557790278ab0 "tevent_req_timedout"
samba_tevent: Running timer event 0x557790290440 "tevent_req_timedout"
samba_tevent: Destroying timer event 0x557790290440 "tevent_req_timedout"
samba_tevent: Schedule immediate event "tevent_req_trigger": 0x557790290170
samba_tevent: Added timed event "tevent_req_timedout": 0x557790290350
samba_tevent: Run immediate event "tevent_req_trigger": 0x557790290170
samba_tevent: Destroying timer event 0x557790290350 "tevent_req_timedout"
samba_tevent: Destroying timer event 0x55779028fe90 "tevent_req_timedout"
samba_tevent: Destroying timer event 0x557790276e80 "tevent_req_timedout"
do_connect: Connection to 192.168.178.26 failed (Error NT_STATUS_CONNECTION_REFUSED)
在服务器上smbclient -L localhost
显示
Enter WORKGROUP\user's password:
Sharename Type Comment
--------- ---- -------
backup Disk
IPC$ IPC IPC Service (Samba Server)
SMB1 disabled -- no workgroup available
这也是我期望在客户端得到的输出。backup
是我一直在创建的并且想要挂载的共享。
我在客户端和服务器端使用 Ubuntu 20.04。