对于Windows 10版本1511以后的版本,默认情况下禁用对SMBv1的支持,因此NetBIOS设备发现被禁用。所以再ubuntu中安装的samba服务无法被windows发现。 WSDD 是 Web Service Discovery host daemon的简称,实现了web服务可以被windows主机发现,这可以有效的帮助smb服务被发现。
######################################################################### [Unit] Description=Web Services Dynamic Discovery host daemon ; Start after the network has been configured After=network-online.target Wants=network-online.target ; It makes sense to have Samba running when wsdd starts, but is not required ;Wants=smb.service
[Service] Type=simple ExecStart=/usr/bin/wsdd --shortlog ; Replace those with an unprivledged user/group that matches your environment, ; like nobody/nogroup or daemon:daemon or a dedicated user for wsdd ; User=nobody ; Group=nobody ; The following lines can be used for a chroot execution of wsdd. ; Also append '--chroot /run/wsdd/chroot' to ExecStart to enable chrooting ;AmbientCapabilities=CAP_SYS_CHROOT ;ExecStartPre=/usr/bin/install -d -o nobody -g nobody -m 0700 /run/wsdd/chroot ;ExecStopPost=rmdir /run/wsdd/chroot