AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-914051

nstuyvesant's questions

Martin Hope
nstuyvesant
Asked: 2021-11-17 10:38:37 +0800 CST

当连接的 macOS 客户端重新启动时,Samba 4.13.14-Ubuntu 出现恐慌

  • 1

刚刚通过以下方式全新安装了Ubuntu Server 21.10,然后是Samba 4.13.14-Ubuntu:

sudo apt install samba avahi-daemon

每当连接到 Samba 的 macOS 客户端重新启动时,我都会收到以下电子邮件:

The Samba 'panic action' script, /usr/share/samba/panic-action,
was called for PID 24963 (/usr/sbin/smbd).

This means there was a problem with the program, such as a segfault.
Below is a backtrace for this process generated with gdb, which shows
the state of the program at the time the error occurred.  The Samba log
files may contain additional information about the problem.

If the problem persists, you are encouraged to first install the
samba-dbgsym package, which contains the debugging symbols for the Samba
binaries.  Then submit the provided information as a bug report to
Ubuntu by visiting this link:
https://launchpad.net/ubuntu/+source/samba/+filebug

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fb71b7be70f in __GI___wait4 (pid=25382, stat_loc=stat_loc@entry=0x7ffd2c2bb578, options=options@entry=0, usage=usage@entry=0x0) at ..
/sysdeps/unix/sysv/linux/wait4.c:30
#0  0x00007fb71b7be70f in __GI___wait4 (pid=25382, stat_loc=stat_loc@entry=0x7ffd2c2bb578, options=options@entry=0, usage=usage@entry=0x0) a
t ../sysdeps/unix/sysv/linux/wait4.c:30
#1  0x00007fb71b7be68b in __GI___waitpid (pid=<optimized out>, stat_loc=stat_loc@entry=0x7ffd2c2bb578, options=options@entry=0) at waitpid.c
:38
#2  0x00007fb71b72594b in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:171
#3  0x00007fb71bc4842f in smb_panic_s3 () from /lib/x86_64-linux-gnu/libsmbconf.so.0
#4  0x00007fb71bcb8fdb in smb_panic () from /lib/x86_64-linux-gnu/libsamba-util.so.0
#5  0x00007fb71bcb92b5 in ?? () from /lib/x86_64-linux-gnu/libsamba-util.so.0
#6  <signal handler called>
#7  0x0000000000000000 in ?? ()
#8  0x00007fb71b26448f in dbwrap_record_delete () from /usr/lib/x86_64-linux-gnu/samba/libdbwrap.so.0
#9  0x00007fb71be805e5 in smbXsrv_session_logoff () from /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0
#10 0x00007fb71be62e17 in ?? () from /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0
#11 0x00007fb71b8ff8ea in tevent_common_invoke_immediate_handler () from /lib/x86_64-linux-gnu/libtevent.so.0
#12 0x00007fb71b8ff90e in tevent_common_loop_immediate () from /lib/x86_64-linux-gnu/libtevent.so.0
#13 0x00007fb71b905760 in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#14 0x00007fb71b903afb in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#15 0x00007fb71b8feb28 in _tevent_loop_once () from /lib/x86_64-linux-gnu/libtevent.so.0
#16 0x00007fb71b8fee0b in tevent_common_loop_wait () from /lib/x86_64-linux-gnu/libtevent.so.0
#17 0x00007fb71b903a8b in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#18 0x00007fb71be4cc38 in smbd_process () from /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0
#19 0x000055cc54ea793d in smbd_accept_connection (ev=0x55cc551e1c20, fde=<optimized out>, flags=<optimized out>, private_data=<optimized out
>) at ../../source3/smbd/server.c:1014

#20 0x00007fb71b8ff4a1 in tevent_common_invoke_fd_handler () from /lib/x86_64-linux-gnu/libtevent.so.0
#21 0x00007fb71b90597f in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#22 0x00007fb71b903afb in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#23 0x00007fb71b8feb28 in _tevent_loop_once () from /lib/x86_64-linux-gnu/libtevent.so.0
#24 0x00007fb71b8fee0b in tevent_common_loop_wait () from /lib/x86_64-linux-gnu/libtevent.so.0
#25 0x00007fb71b903a8b in ?? () from /lib/x86_64-linux-gnu/libtevent.so.0
#26 0x000055cc54ea5c3b in smbd_parent_loop (parent=0x55cc551f5040, ev_ctx=0x55cc551e1c20) at ../../source3/smbd/server.c:1361
#27 main (argc=<optimized out>, argv=<optimized out>) at ../../source3/smbd/server.c:2214
A debugging session is active.

/var/log/samba/log.smbd 显示:

[2021/11/17 11:21:31.378403,  0] ../../lib/util/fault.c:159(smb_panic_log)
  ===============================================================
[2021/11/17 11:21:31.378525,  0] ../../lib/util/fault.c:160(smb_panic_log)
  INTERNAL ERROR: Signal 11: Segmentation fault in pid 24963 (4.13.14-Ubuntu)
[2021/11/17 11:21:31.378565,  0] ../../lib/util/fault.c:164(smb_panic_log)
  If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2021/11/17 11:21:31.378595,  0] ../../lib/util/fault.c:169(smb_panic_log)
  ===============================================================
[2021/11/17 11:21:31.378621,  0] ../../lib/util/fault.c:170(smb_panic_log)
  PANIC (pid 24963): Signal 11: Segmentation fault in 4.13.14-Ubuntu
[2021/11/17 11:21:31.379046,  0] ../../lib/util/fault.c:274(log_stack_trace)
  BACKTRACE: 4 stack frames:
   #0 /lib/x86_64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x34) [0x7fb71bcb63f4]
   #1 /lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2a) [0x7fb71bcb8fca]
   #2 /lib/x86_64-linux-gnu/libsamba-util.so.0(+0x232b5) [0x7fb71bcb92b5]
   #3 /lib/x86_64-linux-gnu/libc.so.6(+0x46520) [0x7fb71b717520]
[2021/11/17 11:21:31.379162,  0] ../../source3/lib/util.c:838(smb_panic_s3)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 24963]
gdb: warning: Couldn't determine a path for the index cache directory.
30  ../sysdeps/unix/sysv/linux/wait4.c: No such file or directory.
[2021/11/17 11:21:32.341990,  0] ../../source3/lib/util.c:845(smb_panic_s3)
  smb_panic(): action returned status 0
[2021/11/17 11:21:32.342045,  0] ../../source3/lib/dumpcore.c:317(dump_core)
  coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern

我的客户是 macOS Monterey,在他们的 /etc/nsmb.conf 中有以下内容:

signing_required = no
protocol_vers_map=6
port445=no_netbios

我的 Ubuntu Server 21.10 的 /etc/samba/smb.conf:

[global]
allow dns updates = disabled
bind interfaces only = Yes
client min protocol = SMB3_02
dcerpc endpoint servers = rpcecho
delete veto files = Yes
disable netbios = Yes
disable spoolss = Yes
dns forwarder = 192.168.1.1
dns proxy = No
enhanced browsing = No
# Next line requires catia (needed if no Windows clients?)
fruit:encoding = native
fruit:metadata = stream
# Next line never worked which is why I configure Avahi to set the icon
;fruit:model = Macmini7
# Do not use NFS access control entries
fruit:nfs_aces = No
# Enable extended attributes (requires streams_xattr)
fruit:resource = xattr
# Next line is already the default
;fruit:zero_file_id = Yes
host msdfs = No
inherit acls = Yes
inherit permissions = Yes
interfaces = lan
lm announce = No
load printers = No
log file = /var/log/samba/log.smbd
log level = 2
logging = file
max log size = 10000
# Next 2 lines defer mDNS config to Avahi
mdns name = mdns
multicast dns register = No
name resolve order = host bcast
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = "*New Password:*" %n\n "*Reenter New Password:*" %n\n "*Password changed.*"
passwd program = /usr/bin/passwd %u
printcap cache time = 0
printcap name = /dev/null
printing = bsd
restrict anonymous = 2
rpc_daemon:spoolssd = disabled
rpc_server:epmapper = disabled
rpc_server:winreg = disabled
rpc_server:lsarpc = disabled
rpc_server:samr = disabled
rpc_server:netlogon = disabled
rpc_server:netdfs = disabled
rpc_server:dssetup = disabled
rpc_server:wkssvc = disabled
rpc_server:spoolss = disabled
rpc_server:svcctl = disabled
rpc_server:ntsvcs = disabled
rpc_server:eventlog = disabled
rpc_server:initshutdown = disabled
rpc_server:mdssvc = disabled
server max protocol = SMB3_11
server min protocol = SMB3_02
# Next line experimental until 4.15
server multi channel support = Yes
server role = standalone server
server services = rpc, smb
server string = %h server (Samba 4.13.14, Ubuntu 21.10)
show add printer wizard = No
smb ports = 445
unix password sync = Yes
use sendfile = Yes
veto files = /._*/.DS_Store/
vfs objects = catia fruit streams_xattr

[homes]
browseable = No
comment = Home Directory
fruit:time machine = No
guest ok = No
spotlight = No
valid users = %S
writable = Yes

[Backup]
comment = Time Machine
fruit:time machine = Yes
guest ok = No
path = /external/%U
spotlight = No
valid users = %U
writable = Yes

为了完整起见,这是我的 /etc/avahi/services/samba.service:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">Saint James</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>
 <service>
   <type>_device-info._tcp</type>
   <port>0</port>
   <txt-record>model=Macmini7</txt-record>
 </service>
 <service>
   <type>_adisk._tcp</type>
   <txt-record>sys=waMa=0,adVF=0x100</txt-record>
   <txt-record>dk0=adVN=Backup,adVF=0x82</txt-record>
 </service>
</service-group>

macOS Monterey 客户端仅需要文件共享和 Time Machine(无 Windows 客户端、无打印、无 Active Directory、无 DFS)。

有人看到这个吗?

apt
  • 2 个回答
  • 596 Views
Martin Hope
nstuyvesant
Asked: 2021-11-07 06:31:09 +0800 CST

在特定接口上禁用 IPv4 和 IPv6

  • 1

使用 Ubuntu 21.10,SoftEther文档建议在用于本地网桥网络适配器的两个以太网接口之一上禁用 IPv4 和 IPv6。

这是我的/etc/netplan/01-network-manager-all.yaml ...

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    lan:
      match:
        macaddress: a8:20:XX:XX:9f:da
      dhcp4: false
      dhcp6: true
      addresses:
        - 192.168.1.3/24
      routes:
        - to: default
          via: 192.168.1.1
          metric: 100
      nameservers:
        addresses: [192.168.1.1]
        search: []
      set-name: lan
    softether:
      match:
        macaddress: 40:6c:XX:XX:4a:93
      dhcp4: false
      dhcp6: false
      link-local: []
      optional: true
      set-name: softether

sudo netplan generate然后跑了sudo netplan apply。如您所见,我将本地网桥的接口重命名为softether。

还将它添加到/etc/sysctl.d/99-sysctl.conf的末尾

net.ipv6.conf.softether.disable_ipv6 = 1

然后跑了sudo sysctl -p。

重新启动后,运行时我仍然在 softether 上看到 IPv4 和 IPv6 地址ip a...

2: softether: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 40:6c:XX:XX:4a:93 brd ff:ff:ff:ff:ff:ff
    altname enp9s0
    inet 169.254.65.216/16 brd 169.254.255.255 scope link noprefixroute softether
       valid_lft forever preferred_lft forever
    inet6 fd8b:a698:e8f4:3:426c:8fff:fe35:4a93/64 scope global deprecated dynamic mngtmpaddr 
       valid_lft 769sec preferred_lft 0sec
    inet6 fd97:65c2:6883:1:426c:8fff:fe35:4a93/64 scope global dynamic mngtmpaddr 
       valid_lft 1785sec preferred_lft 1785sec
    inet6 fda2:db11:4cad:2:426c:8fff:fe35:4a93/64 scope global deprecated dynamic mngtmpaddr 
       valid_lft 769sec preferred_lft 0sec
    inet6 fdaa:ed5f:f69b:4:426c:8fff:fe35:4a93/64 scope global deprecated dynamic mngtmpaddr 
       valid_lft 770sec preferred_lft 0sec
    inet6 fe80::426c:8fff:fe35:4a93/64 scope link 
       valid_lft forever preferred_lft forever

Netplan 文档显示了这些示例...

Example to enable only IPv4 link-local: link-local: [ ipv4 ]
Example to enable all link-local addresses: link-local: [ ipv4, ipv6 ]
Example to disable all link-local addresses: link-local: [ ]

所以我认为使用最后一个会给我想要的东西(但它没有)。

关于我做错了什么有什么想法吗?

ethernet
  • 1 个回答
  • 422 Views
Martin Hope
nstuyvesant
Asked: 2019-05-27 05:32:12 +0800 CST

如何使用 Netplan 删除单个接口上的 IPv6 地址

  • 2

运行 Ubuntu 服务器 19.04。使用 SoftEther 的本地网桥功能。他们的文档建议在用于桥接的接口上禁用 IP。

这是我的 Netplan 配置:

network:
  version: 2
  renderer: networkd
  ethernets:
    lan:
      match:
        macaddress: c8:2a:14:00:00:00
      addresses:
      - 192.168.1.253/24
      dhcp4: false
      gateway4: 192.168.1.254
      nameservers:
        addresses:
        - 192.168.1.254
      set-name: lan
    softether:
      match:
        macaddress: a8:60:b6:00:00:00
      dhcp4: false
      optional: true
      set-name: softether
    wifi:
      match:
        macaddress: 40:6c:8f:00:00:00
      dhcp4: true
      optional: true
      set-name: wifi

仍然在 softether 接口上获得 IPv6:

$ ip a
2: softether: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether a8:60:b6:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::aa60:b6ff:fe09:937c/64 scope link 
       valid_lft forever preferred_lft forever

有没有办法单独使用 Netplan 删除 IPv6?

networking server network-bridge ethernet 19.04
  • 3 个回答
  • 3735 Views
Martin Hope
nstuyvesant
Asked: 2019-04-27 06:22:16 +0800 CST

在客户端上两次看到 Ubuntu Server 19.04 - 可能是 Avahi mDNS 问题

  • 0

只需设置一个运行 Ubuntu Server 19.04 和 Samba 4.10.0 的 Mac Mini。在 macOS Mojave 客户端上,我看到服务器两次 - 一次是带有正确 Mac Mini 图标的“Mac Mini”(漂亮的主机名),一次是带有问号图标的“mac-mini”(静态主机名)。

我在 Avahi 中为前者明确设置了一项服务。似乎有些东西正在自动注册第二个。

这是我的 /etc/avahi/avahi-daemon.conf (认为 disallow-other-stacks 会阻止 systemd-resolve 做它的事情):

[server]
deny-interfaces=softether
disallow-other-stacks=yes
ratelimit-interval-usec=1000000
ratelimit-burst=1000

/etc/avahi/services/timemachine.service

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="no">Mac Mini</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>
 <service>
   <type>_device-info._tcp</type>
   <port>0</port>
   <txt-record>model=Macmini</txt-record>
 </service>
 <service>
   <type>_adisk._tcp</type>
   <txt-record>sys=waMa=0,adVF=0x100</txt-record>
   <txt-record>dk0=adVN=Backup,adVF=0x82</txt-record>
 </service>
 <service>
   <type>_afpovertcp._tcp</type>
   <port>548</port>
 </service>
 <service>
   <type>_ssh._tcp</type>
   <port>22</port>
 </service>
 <service>
   <type>_sftp-ssh._tcp</type>
   <port>22</port>
   <txt-record>path=/home/someone</txt-record>
   <txt-record>u=someone</txt-record>
 </service>
</service-group>

/etc/samba/smb.conf 的相关部分(注意:没有指定fruit:model,因为它没有显示正确的图标,我希望Avahi 设置它):

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
server role = standalone server
fruit:time machine = yes
ea support = yes
disable netbios = yes
disable spoolss = yes
allow trusted domains = no
load printers = no
mdns name = mdns

这是 avahi-browse 看到的我不想要的内容:

# avahi-browse -a | grep mac-mini
+    lan IPv6 mac-mini                                      Apple TimeMachine    local
+    lan IPv4 mac-mini                                      Apple TimeMachine    local
+    lan IPv6 mac-mini                                      Microsoft Windows Network local
+    lan IPv4 mac-mini                                      Microsoft Windows Network local
+    lan IPv6 mac-mini                                      _device-info._tcp    local
+    lan IPv4 mac-mini                                      _device-info._tcp    local
+     lo IPv4 mac-mini                                      Microsoft Windows Network local
+     lo IPv4 mac-mini                                      _device-info._tcp    local
+     lo IPv4 mac-mini                                      Apple TimeMachine    local

这是我想要的显示方式:

# avahi-browse -a | grep "Mac Mini"
+    lan IPv6 Mac Mini                                      SSH Remote Terminal  local
+    lan IPv4 Mac Mini                                      SSH Remote Terminal  local
+     lo IPv4 Mac Mini                                      SSH Remote Terminal  local
+    lan IPv6 Mac Mini                                      Apple TimeMachine    local
+    lan IPv4 Mac Mini                                      Apple TimeMachine    local
+     lo IPv4 Mac Mini                                      Apple TimeMachine    local
+    lan IPv6 Mac Mini                                      _device-info._tcp    local
+    lan IPv4 Mac Mini                                      _device-info._tcp    local
+     lo IPv4 Mac Mini                                      _device-info._tcp    local
+    lan IPv6 Mac Mini                                      SFTP File Transfer   local
+    lan IPv4 Mac Mini                                      SFTP File Transfer   local
+     lo IPv4 Mac Mini                                      SFTP File Transfer   local
+    lan IPv6 Mac Mini                                      Apple File Sharing   local
+    lan IPv4 Mac Mini                                      Apple File Sharing   local
+     lo IPv4 Mac Mini                                      Apple File Sharing   local
+    lan IPv6 Mac Mini                                      Microsoft Windows Network local
+    lan IPv4 Mac Mini                                      Microsoft Windows Network local
+     lo IPv4 Mac Mini                                      Microsoft Windows Network local

关于为 mac-mini 动态注册服务的内容与我使用 Avahi 服务定义明确注册的内容有什么想法吗?

samba avahi mdns
  • 1 个回答
  • 2962 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve