Answers:
创建文件/etc/avahi/services/samba.service:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h filer</name>
<service>
<type>_smb._tcp</type>
<port>139</port>
</service>
</service-group>
然后重新启动avahi:
service avahi restart
如今,已使用端口445。因此配置文件应如下所示:
root:~# cat /etc/avahi/services/samba.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
您需要安装Ahavi,这是一个免费的ZeroConf(Bonjour)实现。完成之后,请参见: