我有一个非常奇怪的问题,
我已经设置并运行了 Samba。如果我使用手动访问,我可以访问它,例如:
smb://myserver
但是它没有显示在我的工作组下的列表中。(我的网络下没有显示文件夹)
这是 smb.conf
[global]
workgroup = WORKGROUP #(Set this to your Windows workgroup)
server string = %h server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
wins support = yes
usershare allow guests = yes
[data]
comment = Data share
path = /media/external
browseable = yes
read only = no
writeable = yes
available = yes
only guest = no
create mask = 0777
directory mask = 0777
public = yes
编辑:
nmblookup 的结果:
$nmblookup myserve
querying myserver on 192.168.0.255
192.168.0.3 myserver<00>
testparm 的结果:
$testparm -v
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[data]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
答案1
根据文档:“以分号(“;”)或井号(“#”)开头的任何行都会被忽略,仅包含空格的行也会被忽略。”
因此遗憾的是,除非 ( #
) 或 ( )出现在行首,;
否则不允许使用 ( )#
或 ( ) 进行注释。;
#(Set this to your Windows workgroup)
如果您从工作组指令中删除尾随部分,它应该可以为您工作。