ubuntu14.04 samba 无法访问。您可能没有权限使用网络资源 。。。
windows可以访问其它samba服务器,偏偏我这个新安装的ubuntu14.04 samba不行。一番折腾终于搞定,记录关键点如下:
一、学会搜索
盲目搜索就会浪费时间了,查log才是程序员干的事:
/var/log/samba/
Bad talloc magic value - unknown value
Fix:
sudo apt-get install libtalloc2
二、testparm -s 命令使用
testparm rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Fix:
sudo vim /etc/security/limits.conf
# End of file
* - nofile 16384
三、重新配置smb.conf
sudo cp /usr/share/samba/smb.conf /etc/samba/
sudo vim /etc/samba/smb.conf
[win-share]
comment = Printer Drivers
path = /home/win
browseable = yes
read only = no
guest ok = yes
public = no
writeable = yes
sudo smbpasswd -a win
sudo service smbd restart
四、其它
smbclient //192.168.1.157/zhaoshare
sudo mount -t cifs -o username=win,password=123456 //192.168.1.157/win /home/win/smb
https://download.samba.org/pub/samba/stable/
甚至有人自己编译最新的samba,我就不玩了。