ubuntu 14.04 samba

来源:互联网 发布:王思仪铁观音淘宝店 编辑:程序博客网 时间:2024/06/06 01:02

注:此为复制别人的文章,怕找不到,记录在此.


一、学会搜索

盲目搜索简直浪费时间,查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/win

sudo mount -t cifs -o username=win,password=123456 //192.168.1.157/win /home/win/smb


sudo mount -t cifs -o username=win,password=123456,uid=1000,gid=1000,rw,dir_mode=0777,file_mode=0777 //192.168.0.54/win /home/win/smb

https://download.samba.org/pub/samba/stable/